openjdk17 jvm堆空间分配

##堆空间分配源码

jint Universe::initialize_heap() {assert(_collectedHeap == NULL, "Heap already created");_collectedHeap = GCConfig::arguments()->create_heap();log_info(gc)("Using %s", _collectedHeap->name());return _collectedHeap->initialize();
}

##

jint G1CollectedHeap::initialize() {// Necessary to satisfy locking discipline assertions.MutexLocker x(Heap_lock);// While there are no constraints in the GC code that HeapWordSize// be any particular value, there are multiple other areas in the// system which believe this to be true (e.g. oop->object_size in some// cases incorrectly returns the size in wordSize units rather than// HeapWordSize).guarantee(HeapWordSize == wordSize, "HeapWordSize must equal wordSize");size_t init_byte_size = InitialHeapSize;size_t reserved_byte_size = G1Arguments::heap_reserved_size_bytes();// Ensure that the sizes are properly aligned.Universe::check_alignment(init_byte_size, HeapRegion::GrainBytes, "g1 heap");Universe::check_alignment(reserved_byte_size, HeapRegion::GrainBytes, "g1 heap");Universe::check_alignment(reserved_byte_size, HeapAlignment, "g1 heap");// Reserve the maximum.// When compressed oops are enabled, the preferred heap base// is calculated by subtracting the requested size from the// 32Gb boundary and using the result as the base address for// heap reservation. If the requested size is not aligned to// HeapRegion::GrainBytes (i.e. the alignment that is passed// into the ReservedHeapSpace constructor) then the actual// base of the reserved heap may end up differing from the// address that was requested (i.e. the preferred heap base).// If this happens then we could end up using a non-optimal// compressed oops mode.ReservedHeapSpace heap_rs = Universe::reserve_heap(reserved_byte_size,HeapAlignment);initialize_reserved_region(heap_rs);// Create the barrier set for the entire reserved region.G1CardTable* ct = new G1CardTable(heap_rs.region());ct->initialize();G1BarrierSet* bs = new G1BarrierSet(ct);bs->initialize();assert(bs->is_a(BarrierSet::G1BarrierSet), "sanity");BarrierSet::set_barrier_set(bs);_card_table = ct;{G1SATBMarkQueueSet& satbqs = bs->satb_mark_queue_set();satbqs.set_process_completed_buffers_threshold(G1SATBProcessCompletedThreshold);satbqs.set_buffer_enqueue_threshold_percentage(G1SATBBufferEnqueueingThresholdPercent);}// Create the hot card cache._hot_card_cache = new G1HotCardCache(this);// Create space mappers.size_t page_size = heap_rs.page_size();G1RegionToSpaceMapper* heap_storage =G1RegionToSpaceMapper::create_mapper(heap_rs,heap_rs.size(),page_size,HeapRegion::GrainBytes,1,mtJavaHeap);if(heap_storage == NULL) {vm_shutdown_during_initialization("Could not initialize G1 heap");return JNI_ERR;}os::trace_page_sizes("Heap",MinHeapSize,reserved_byte_size,page_size,heap_rs.base(),heap_rs.size());heap_storage->set_mapping_changed_listener(&_listener);// Create storage for the BOT, card table, card counts table (hot card cache) and the bitmaps.G1RegionToSpaceMapper* bot_storage =create_aux_memory_mapper("Block Offset Table",G1BlockOffsetTable::compute_size(heap_rs.size() / HeapWordSize),G1BlockOffsetTable::heap_map_factor());G1RegionToSpaceMapper* cardtable_storage =create_aux_memory_mapper("Card Table",G1CardTable::compute_size(heap_rs.size() / HeapWordSize),G1CardTable::heap_map_factor());G1RegionToSpaceMapper* card_counts_storage =create_aux_memory_mapper("Card Counts Table",G1CardCounts::compute_size(heap_rs.size() / HeapWordSize),G1CardCounts::heap_map_factor());size_t bitmap_size = G1CMBitMap::compute_size(heap_rs.size());G1RegionToSpaceMapper* prev_bitmap_storage =create_aux_memory_mapper("Prev Bitmap", bitmap_size, G1CMBitMap::heap_map_factor());G1RegionToSpaceMapper* next_bitmap_storage =create_aux_memory_mapper("Next Bitmap", bitmap_size, G1CMBitMap::heap_map_factor());_hrm.initialize(heap_storage, prev_bitmap_storage, next_bitmap_storage, bot_storage, cardtable_storage, card_counts_storage);_card_table->initialize(cardtable_storage);// Do later initialization work for concurrent refinement._hot_card_cache->initialize(card_counts_storage);// 6843694 - ensure that the maximum region index can fit// in the remembered set structures.const uint max_region_idx = (1U << (sizeof(RegionIdx_t)*BitsPerByte-1)) - 1;guarantee((max_reserved_regions() - 1) <= max_region_idx, "too many regions");// The G1FromCardCache reserves card with value 0 as "invalid", so the heap must not// start within the first card.guarantee(heap_rs.base() >= (char*)G1CardTable::card_size, "Java heap must not start within the first card.");G1FromCardCache::initialize(max_reserved_regions());// Also create a G1 rem set._rem_set = new G1RemSet(this, _card_table, _hot_card_cache);_rem_set->initialize(max_reserved_regions());size_t max_cards_per_region = ((size_t)1 << (sizeof(CardIdx_t)*BitsPerByte-1)) - 1;guarantee(HeapRegion::CardsPerRegion > 0, "make sure it's initialized");guarantee(HeapRegion::CardsPerRegion < max_cards_per_region,"too many cards per region");FreeRegionList::set_unrealistically_long_length(max_regions() + 1);_bot = new G1BlockOffsetTable(reserved(), bot_storage);{size_t granularity = HeapRegion::GrainBytes;_region_attr.initialize(reserved(), granularity);_humongous_reclaim_candidates.initialize(reserved(), granularity);}_workers = new WorkGang("GC Thread", ParallelGCThreads,true /* are_GC_task_threads */,false /* are_ConcurrentGC_threads */);if (_workers == NULL) {return JNI_ENOMEM;}_workers->initialize_workers();_numa->set_region_info(HeapRegion::GrainBytes, page_size);// Create the G1ConcurrentMark data structure and thread.// (Must do this late, so that "max_[reserved_]regions" is defined.)_cm = new G1ConcurrentMark(this, prev_bitmap_storage, next_bitmap_storage);_cm_thread = _cm->cm_thread();// Now expand into the initial heap size.if (!expand(init_byte_size, _workers)) {vm_shutdown_during_initialization("Failed to allocate initial heap.");return JNI_ENOMEM;}// Perform any initialization actions delegated to the policy.policy()->init(this, &_collection_set);jint ecode = initialize_concurrent_refinement();if (ecode != JNI_OK) {return ecode;}ecode = initialize_service_thread();if (ecode != JNI_OK) {return ecode;}// Initialize and schedule sampling task on service thread._rem_set->initialize_sampling_task(service_thread());// Create and schedule the periodic gc task on the service thread._periodic_gc_task = new G1PeriodicGCTask("Periodic GC Task");_service_thread->register_task(_periodic_gc_task);{G1DirtyCardQueueSet& dcqs = G1BarrierSet::dirty_card_queue_set();dcqs.set_process_cards_threshold(concurrent_refine()->yellow_zone());dcqs.set_max_cards(concurrent_refine()->red_zone());}// Here we allocate the dummy HeapRegion that is required by the// G1AllocRegion class.HeapRegion* dummy_region = _hrm.get_dummy_region();// We'll re-use the same region whether the alloc region will// require BOT updates or not and, if it doesn't, then a non-young// region will complain that it cannot support allocations without// BOT updates. So we'll tag the dummy region as eden to avoid that.dummy_region->set_eden();// Make sure it's full.dummy_region->set_top(dummy_region->end());G1AllocRegion::setup(this, dummy_region);_allocator->init_mutator_alloc_regions();// Do create of the monitoring and management support so that// values in the heap have been properly initialized._g1mm = new G1MonitoringSupport(this);_preserved_marks_set.init(ParallelGCThreads);_collection_set.initialize(max_reserved_regions());_regions_failed_evacuation = NEW_C_HEAP_ARRAY(volatile bool, max_regions(), mtGC);G1InitLogger::print();return JNI_OK;
}

##

ReservedHeapSpace Universe::reserve_heap(size_t heap_size, size_t alignment) {assert(alignment <= Arguments::conservative_max_heap_alignment(),"actual alignment " SIZE_FORMAT " must be within maximum heap alignment " SIZE_FORMAT,alignment, Arguments::conservative_max_heap_alignment());size_t total_reserved = align_up(heap_size, alignment);assert(!UseCompressedOops || (total_reserved <= (OopEncodingHeapMax - os::vm_page_size())),"heap size is too big for compressed oops");size_t page_size = os::vm_page_size();if (UseLargePages && is_aligned(alignment, os::large_page_size())) {page_size = os::large_page_size();} else {// Parallel is the only collector that might opt out of using large pages// for the heap.assert(!UseLargePages || UseParallelGC , "Wrong alignment to use large pages");}// Now create the space.ReservedHeapSpace total_rs(total_reserved, alignment, page_size, AllocateHeapAt);if (total_rs.is_reserved()) {assert((total_reserved == total_rs.size()) && ((uintptr_t)total_rs.base() % alignment == 0),"must be exactly of required size and alignment");// We are good.if (AllocateHeapAt != NULL) {log_info(gc,heap)("Successfully allocated Java heap at location %s", AllocateHeapAt);}if (UseCompressedOops) {CompressedOops::initialize(total_rs);}Universe::calculate_verify_data((HeapWord*)total_rs.base(), (HeapWord*)total_rs.end());return total_rs;}vm_exit_during_initialization(err_msg("Could not reserve enough space for " SIZE_FORMAT "KB object heap",total_reserved/K));// satisfy compilerShouldNotReachHere();return ReservedHeapSpace(0, 0, os::vm_page_size());
}

##

bool G1CollectedHeap::expand(size_t expand_bytes, WorkGang* pretouch_workers, double* expand_time_ms) {size_t aligned_expand_bytes = ReservedSpace::page_align_size_up(expand_bytes);aligned_expand_bytes = align_up(aligned_expand_bytes,HeapRegion::GrainBytes);log_debug(gc, ergo, heap)("Expand the heap. requested expansion amount: " SIZE_FORMAT "B expansion amount: " SIZE_FORMAT "B",expand_bytes, aligned_expand_bytes);if (is_maximal_no_gc()) {log_debug(gc, ergo, heap)("Did not expand the heap (heap already fully expanded)");return false;}double expand_heap_start_time_sec = os::elapsedTime();uint regions_to_expand = (uint)(aligned_expand_bytes / HeapRegion::GrainBytes);assert(regions_to_expand > 0, "Must expand by at least one region");uint expanded_by = _hrm.expand_by(regions_to_expand, pretouch_workers);if (expand_time_ms != NULL) {*expand_time_ms = (os::elapsedTime() - expand_heap_start_time_sec) * MILLIUNITS;}if (expanded_by > 0) {size_t actual_expand_bytes = expanded_by * HeapRegion::GrainBytes;assert(actual_expand_bytes <= aligned_expand_bytes, "post-condition");policy()->record_new_heap_size(num_regions());} else {log_debug(gc, ergo, heap)("Did not expand the heap (heap expansion operation failed)");// The expansion of the virtual storage space was unsuccessful.// Let's see if it was because we ran out of swap.if (G1ExitOnExpansionFailure &&_hrm.available() >= regions_to_expand) {// We had head room...vm_exit_out_of_memory(aligned_expand_bytes, OOM_MMAP_ERROR, "G1 heap expansion");}}return regions_to_expand > 0;
}

##gdb调试openjdk17 堆内存分配

#0  anon_mmap (requested_addr=0xfce00000 <error: Cannot access memory at address 0xfce00000>, bytes=52428800)at /home/yym/openjdk17/jdk17-master/src/hotspot/os/linux/os_linux.cpp:3389
#1  0x00007ffff687cc9c in os::pd_attempt_reserve_memory_at (requested_addr=0xfce00000 <error: Cannot access memory at address 0xfce00000>, bytes=52428800, exec=false)at /home/yym/openjdk17/jdk17-master/src/hotspot/os/linux/os_linux.cpp:4182
#2  0x00007ffff6870247 in os::attempt_reserve_memory_at (addr=0xfce00000 <error: Cannot access memory at address 0xfce00000>, bytes=52428800, executable=false)at /home/yym/openjdk17/jdk17-master/src/hotspot/share/runtime/os.cpp:1749
#3  0x00007ffff6bf2df5 in attempt_map_or_reserve_memory_at (base=0xfce00000 <error: Cannot access memory at address 0xfce00000>, size=52428800, fd=-1, executable=false)at /home/yym/openjdk17/jdk17-master/src/hotspot/share/memory/virtualspace.cpp:87
#4  0x00007ffff6bf3172 in reserve_memory (requested_address=0xfce00000 <error: Cannot access memory at address 0xfce00000>, size=52428800, alignment=2097152, fd=-1, exec=false)at /home/yym/openjdk17/jdk17-master/src/hotspot/share/memory/virtualspace.cpp:152
#5  0x00007ffff6bf35a4 in ReservedSpace::reserve (this=0x7ffff7bfe730, size=52428800, alignment=2097152, page_size=4096,requested_address=0xfce00000 <error: Cannot access memory at address 0xfce00000>, executable=false)at /home/yym/openjdk17/jdk17-master/src/hotspot/share/memory/virtualspace.cpp:250
#6  0x00007ffff6bf3e99 in ReservedHeapSpace::try_reserve_heap (this=0x7ffff7bfe730, size=52428800, alignment=2097152, page_size=4096,requested_address=0xfce00000 <error: Cannot access memory at address 0xfce00000>) at /home/yym/openjdk17/jdk17-master/src/hotspot/share/memory/virtualspace.cpp:391
#7  0x00007ffff6bf3fa5 in ReservedHeapSpace::try_reserve_range (this=0x7ffff7bfe730, highest_start=0xfce00000 <error: Cannot access memory at address 0xfce00000>,lowest_start=0x80000000 <error: Cannot access memory at address 0x80000000>, attach_point_alignment=2097152,aligned_heap_base_min_address=0x80000000 <error: Cannot access memory at address 0x80000000>, upper_bound=0x100000000 <error: Cannot access memory at address 0x100000000>,size=52428800, alignment=2097152, page_size=4096) at /home/yym/openjdk17/jdk17-master/src/hotspot/share/memory/virtualspace.cpp:423
#8  0x00007ffff6bf44a4 in ReservedHeapSpace::initialize_compressed_heap (this=0x7ffff7bfe730, size=52428800, alignment=2097152, page_size=4096)at /home/yym/openjdk17/jdk17-master/src/hotspot/share/memory/virtualspace.cpp:525
#9  0x00007ffff6bf49c1 in ReservedHeapSpace::ReservedHeapSpace (this=0x7ffff7bfe730, size=52428800, alignment=2097152, page_size=4096, heap_allocation_directory=0x0)at /home/yym/openjdk17/jdk17-master/src/hotspot/share/memory/virtualspace.cpp:610
#10 0x00007ffff6b986c1 in Universe::reserve_heap (heap_size=52428800, alignment=2097152) at /home/yym/openjdk17/jdk17-master/src/hotspot/share/memory/universe.cpp:829
#11 0x00007ffff61daeb5 in G1CollectedHeap::initialize (this=0x7ffff00453d0) at /home/yym/openjdk17/jdk17-master/src/hotspot/share/gc/g1/g1CollectedHeap.cpp:1601
#12 0x00007ffff6b98464 in Universe::initialize_heap () at /home/yym/openjdk17/jdk17-master/src/hotspot/share/memory/universe.cpp:799
#13 0x00007ffff6b981e0 in universe_init () at /home/yym/openjdk17/jdk17-master/src/hotspot/share/memory/universe.cpp:734
#14 0x00007ffff633fe8c in init_globals () at /home/yym/openjdk17/jdk17-master/src/hotspot/share/runtime/init.cpp:122
#15 0x00007ffff6b60ccb in Threads::create_vm (args=0x7ffff7bfed50, canTryAgain=0x7ffff7bfec5b) at /home/yym/openjdk17/jdk17-master/src/hotspot/share/runtime/thread.cpp:2852
#16 0x00007ffff644f659 in JNI_CreateJavaVM_inner (vm=0x7ffff7bfeda8, penv=0x7ffff7bfedb0, args=0x7ffff7bfed50)at /home/yym/openjdk17/jdk17-master/src/hotspot/share/prims/jni.cpp:3621
#17 0x00007ffff644f9a5 in JNI_CreateJavaVM (vm=0x7ffff7bfeda8, penv=0x7ffff7bfedb0, args=0x7ffff7bfed50) at /home/yym/openjdk17/jdk17-master/src/hotspot/share/prims/jni.cpp:3709
#18 0x00007ffff7facd29 in InitializeJVM (pvm=0x7ffff7bfeda8, penv=0x7ffff7bfedb0, ifn=0x7ffff7bfee00)at /home/yym/openjdk17/jdk17-master/src/java.base/share/native/libjli/java.c:1541
#19 0x00007ffff7fa9623 in JavaMain (_args=0x7fffffffaef0) at /home/yym/openjdk17/jdk17-master/src/java.base/share/native/libjli/java.c:415
#20 0x00007ffff7fb08ab in ThreadJavaMain (args=0x7fffffffaef0) at /home/yym/openjdk17/jdk17-master/src/java.base/unix/native/libjli/java_md.c:651
#21 0x00007ffff7c94ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#22 0x00007ffff7d26850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/482383.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

通讯专题4.1——CAN通信之计算机网络与现场总线

从通讯专题4开始&#xff0c;来学习CAN总线的内容。 为了更好的学习CAN&#xff0c;先从计算机网络与现场总线开始了解。 1 计算机网络体系的结构 在我们生活当中&#xff0c;有许多的网络&#xff0c;如交通网&#xff08;铁路、公路等&#xff09;、通信网&#xff08;电信、…

使用OSPF配置不同进程的中小型网络

要求&#xff1a; 给每个设备的接口配置好相应的地址 对进程1的各区域使用认证&#xff0c;认证为明文发送&#xff0c;明文保存 对骨干区域使用接口认证&#xff0c;非骨干区域使用区域认证 其他ospf进程均使用区域0 FW1上配置接口信任域和非信任域和服务器&#xff0c…

软考高项经验分享:我的备考之路与实战心得

软考&#xff0c;尤其是信息系统项目管理师&#xff08;高项&#xff09;考试&#xff0c;对于众多追求职业提升与专业认可的人士来说&#xff0c;是一场充满挑战与机遇的征程。我在当年参加软考高项的经历&#xff0c;可谓是一波三折&#xff0c;其中既有成功的喜悦&#xff0…

Transformers在计算机视觉领域中的应用【第1篇:ViT——Transformer杀入CV界之开山之作】

目录 1 模型结构2 模型的前向过程3 思考4 结论 论文&#xff1a; AN IMAGE IS WORTH 16X16 WORDS: TRANSFORMERS FOR IMAGE RECOGNITION AT SCALE 代码&#xff1a;https://github.com/google-research/vision_transformer Huggingface&#xff1a;https://github.com/huggingf…

Unity3D模型场景等测量长度和角度功能demo开发

最近项目用到多段连续测量物体长度和角度功能&#xff0c;自己研究了下。 1.其中向量角度计算&#xff1a; 需要传入三个坐标来进行计算。三个坐标确定两条向量线段的方向&#xff0c;从而来计算夹角。 public Vector3 SetAngle(Vector3 p1, Vector3 p2,Vector3 p3) { …

蓝桥杯第 23 场 小白入门赛

一、前言 好久没打蓝桥杯官网上的比赛了&#xff0c;回来感受一下&#xff0c;这难度区分度还是挺大的 二、题目总览 三、具体题目 3.1 1. 三体时间【算法赛】 思路 额...签到题 我的代码 // Problem: 1. 三体时间【算法赛】 // Contest: Lanqiao - 第 23 场 小白入门赛 …

从0开始学PHP面向对象内容之常用设计模式(享元)

二、结构型设计模式 7、享元模式&#xff08;Flyweight Pattern&#xff09; 这里是引用享元模式&#xff08;Flyweight Pattern&#xff09; 是一种结构型设计模式&#xff0c;旨在通过共享对象来减少内存使用&#xff0c;尤其适用于大量相似对象的场景。通过共享和重用对象的…

YOLO 标注工具 AutoLabel 支持 win mac linux

常见的标注工具&#xff0c;功能基础操作繁琐&#xff0c;无复制粘贴&#xff0c;标签无法排序修改&#xff0c;UI不美观&#xff0c;bug修正不及时&#xff0c;没有集成识别、训练、模型导出… 怎么办呢&#xff1f;AutoLabel它来了 Quick Start 一图胜千言 图像标注 支持YOL…

《Python基础》之Python中可以转换成json数据类型的数据

目录 一、JSON简介 JSON有两种基本结构 1、对象&#xff08;Object&#xff09; 2、数组&#xff08;Array&#xff09; 二、将数据装换成json数据类型方法 三、在Python中&#xff0c;以下数据类型可以直接转换为JSON数据类型 1、字典&#xff08;Dictionary&#xff09…

如何在Bash中等待多个子进程完成,并且当其中任何一个子进程以非零退出状态结束时,使主进程也返回一个非零的退出码?

文章目录 问题回答参考 问题 如何在 Bash 脚本中等待该脚本启动的多个子进程完成&#xff0c;并且当这其中任意一个子进程以非零退出码结束时&#xff0c;让该脚本也返回一个非零的退出码&#xff1f; 简单的脚本: #!/bin/bash for i in seq 0 9; docalculations $i & d…

远程桌面协助控制软件 RustDesk v1.3.3 多语言中文版

RustDesk 是一款开源的远程桌面软件&#xff0c;支持多平台操作&#xff0c;包括Windows、macOS、Linux、iOS、Android和Web。它提供端到端加密和基于角色的访问控制&#xff0c;确保安全性和隐私保护。使用简单&#xff0c;无需复杂配置&#xff0c;通过输入ID和密码即可快速连…

LWIP和FATFS 实现 FTP 服务端

目录 一、前言 二、LWIP 和 FTP 简介 1.LWIP 2.FTP 三、实现 FTP 服务端的主要步骤 1.初始化 LWIP 2.创建 FTP 服务器任务 3.处理客户端连接 4.实现 FTP 命令处理 5.文件系统操作 6.错误处理和日志记录 四、示例代码 1.创建FTP任务 2. FTP任务代码 3.处理交互数据…

多线程篇-8--线程安全(死锁,常用保障安全的方法,安全容器,原子类,Fork/Join框架等)

1、线程安全和不安全定义 &#xff08;1&#xff09;、线程安全 线程安全是指一个类或方法在被多个线程访问的情况下可以正确得到结果&#xff0c;不会出现数据不一致或其他错误行为。 线程安全的条件 1、原子性&#xff08;Atomicity&#xff09; 多个操作要么全部完成&a…

【css实现收货地址下边的平行四边形彩色线条】

废话不多说&#xff0c;直接上代码&#xff1a; <div class"address-block" ><!-- 其他内容... --><div class"checked-ar"></div> </div> .address-block{height:120px;position: relative;overflow: hidden;width: 500p…

【Python网络爬虫笔记】5-(Request 带参数的get请求) 爬取豆瓣电影排行信息

目录 1.抓包工具查看网站信息2.代码实现3.运行结果 1.抓包工具查看网站信息 请求路径 url:https://movie.douban.com/typerank请求参数 页面往下拉&#xff0c;出现新的请求结果&#xff0c;参数start更新&#xff0c;每次刷新出20条新的电影数据 2.代码实现 # 使用网络爬…

「Mac畅玩鸿蒙与硬件35」UI互动应用篇12 - 简易日历

本篇将带你实现一个简易日历应用&#xff0c;显示当前月份的日期&#xff0c;并支持选择特定日期的功能。用户可以通过点击日期高亮选中&#xff0c;还可以切换上下月份&#xff0c;体验动态界面的交互效果。 关键词 UI互动应用简易日历动态界面状态管理用户交互 一、功能说明…

elastic net回归

Elastic Net回归是一种结合了**岭回归&#xff08;Ridge Regression&#xff09;和Lasso回归&#xff08;Lasso Regression&#xff09;**的回归方法&#xff0c;旨在同时处理多重共线性和变量选择问题。Elastic Net通过惩罚项&#xff08;正则化&#xff09;对模型进行约束&am…

CSP-J初赛不会备考咋办?

以下备考攻略仅供参考&#xff0c;如需资料请私信作者&#xff01;求支持&#xff01; 目录 一、编程语言基础 1.语法知识 -变量与数据类型 -运算符 -控制结构 -函数 2.标准库的使用 -输入输出流 -字符串处理 -容器类&#xff08;可选&#xff09; 二、算法与数据结构 1.基…

IDEA全局设置-解决maven加载过慢的问题

一、IDEA全局设置 注意&#xff1a;如果不是全局设置&#xff0c;仅仅针对某个项目有效&#xff1b;例在利用网上教程解决maven加载过慢的问题时&#xff0c;按步骤设置却得不到解决&#xff0c;原因就是没有在全局设置。 1.如何进行全局设置 a.在项目页面&#xff0c;点击f…

JAVAWeb之CSS学习

前引 CSS&#xff0c;层叠样式表&#xff08;Cascading Style Sheets&#xff09;&#xff0c;能够对网页中元素位置的排版进行像素级精确控制&#xff0c;支持几乎所有的字体字号样式&#xff0c;拥有网页对象和模型样式编辑的能力&#xff0c;简单来说&#xff0c;美化页面。…