openjdk17 中 klass 数组 在元空间内存分配

在 OpenJDK 17 中,klass 对象(即 Java 类的元数据)的内存分配通常在元空间(Metaspace)中进行。元空间是 Java 堆外的一块内存区域,用于存储类的元数据。以下几个关键函数,它们共同参与了 klass 对象的内存分配过程:

  1. ConstantPool::allocate_resolved_klasses

    • 这个函数用于为 ConstantPool 中解析后的类条目分配内存。它创建了一个 Array<Klass*> 类型的数组,用于存储指向已解析类的指针。
  2. MetadataFactory::new_array

    • 这是一个模板函数,用于创建一个新的元数据数组。它调用 Array<T> 类的构造函数来分配内存,并返回一个指向新数组的指针。
  3. Array<T>::operator new

    • 这个模板函数是 new 操作符的重载版本,专门为元数据数组分配内存。它调用 Metaspace::allocate 来在元空间中分配内存。
  4. Metaspace::allocate

    • 这个函数是元空间内存分配的核心函数。它接受类加载器数据、请求的字大小、类型和线程指针作为参数,并返回一个指向分配的内存区域的指针。
  5. ClassLoaderMetaspace::allocate

    • 这个函数用于从类加载器的元空间中分配内存。它根据元数据类型(类或非类)选择正确的内存区域(类空间或非类空间)进行分配。
  6. MetaspaceArena::allocate

    • 这个函数尝试从当前的 MetaspaceArena 中分配内存。如果当前块太小或不足以容纳请求的大小,它会尝试扩展当前块或分配一个新的块。
  7. Metachunk::allocate

    • 这个函数用于在 Metachunk 中分配内存。Metachunk 是元空间中用于存储元数据的一块内存区域。

这些函数共同构成了 OpenJDK 中元空间分配的框架,它们确保了类的元数据能够在堆外内存中被有效地管理和回收。通过这种方式,OpenJDK 减少了 Full GC 的频率,提高了 JVM 的性能和稳定性。

##C++源代码

void ConstantPool::allocate_resolved_klasses(ClassLoaderData* loader_data, int num_klasses, TRAPS) {
  // A ConstantPool can't possibly have 0xffff valid class entries,
  // because entry #0 must be CONSTANT_Invalid, and each class entry must refer to a UTF8
  // entry for the class's name. So at most we will have 0xfffe class entries.
  // This allows us to use 0xffff (ConstantPool::_temp_resolved_klass_index) to indicate
  // UnresolvedKlass entries that are temporarily created during class redefinition.
  assert(num_klasses < CPKlassSlot::_temp_resolved_klass_index, "sanity");
  assert(resolved_klasses() == NULL, "sanity");
  Array<Klass*>* rk = MetadataFactory::new_array<Klass*>(loader_data, num_klasses, CHECK);
  set_resolved_klasses(rk);
}
template <typename T>
  static Array<T>* new_array(ClassLoaderData* loader_data, int length, TRAPS) {
    // The "true" argument is because all metadata arrays are read only when
    // dumped to the shared archive
    return new (loader_data, length, THREAD) Array<T>(length);
  }
template <typename T>
inline void* Array<T>::operator new(size_t size, ClassLoaderData* loader_data, int length, TRAPS) throw() {
  size_t word_size = Array::size(length);
  return (void*) Metaspace::allocate(loader_data, word_size,
                                     MetaspaceObj::array_type(sizeof(T)), THREAD);
}
MetaWord* Metaspace::allocate(ClassLoaderData* loader_data, size_t word_size,
                              MetaspaceObj::Type type, TRAPS) {

  if (HAS_PENDING_EXCEPTION) {
    assert(false, "Should not allocate with exception pending");
    return NULL;  // caller does a CHECK_NULL too
  }

  MetaWord* result = allocate(loader_data, word_size, type);

  if (result == NULL) {
    MetadataType mdtype = (type == MetaspaceObj::ClassType) ? ClassType : NonClassType;
    tracer()->report_metaspace_allocation_failure(loader_data, word_size, type, mdtype);

    // Allocation failed.
    if (is_init_completed()) {
      // Only start a GC if the bootstrapping has completed.
      // Try to clean out some heap memory and retry. This can prevent premature
      // expansion of the metaspace.
      result = Universe::heap()->satisfy_failed_metadata_allocation(loader_data, word_size, mdtype);
    }

    if (result == NULL) {
      report_metadata_oome(loader_data, word_size, type, mdtype, THREAD);
      assert(HAS_PENDING_EXCEPTION, "sanity");
      return NULL;
    }

    // Zero initialize.
    Copy::fill_to_words((HeapWord*)result, word_size, 0);

    log_trace(metaspace)("Metaspace::allocate: type %d return " PTR_FORMAT ".", (int)type, p2i(result));
  }

  return result;
}
MetaWord* Metaspace::allocate(ClassLoaderData* loader_data, size_t word_size,
                              MetaspaceObj::Type type) {
  assert(word_size <= Metaspace::max_allocation_word_size(),
         "allocation size too large (" SIZE_FORMAT ")", word_size);

  assert(loader_data != NULL, "Should never pass around a NULL loader_data. "
        "ClassLoaderData::the_null_class_loader_data() should have been used.");

  MetadataType mdtype = (type == MetaspaceObj::ClassType) ? ClassType : NonClassType;

  // Try to allocate metadata.
  MetaWord* result = loader_data->metaspace_non_null()->allocate(word_size, mdtype);

  if (result != NULL) {
    // Zero initialize.
    Copy::fill_to_words((HeapWord*)result, word_size, 0);

    log_trace(metaspace)("Metaspace::allocate: type %d return " PTR_FORMAT ".", (int)type, p2i(result));
  }

  return result;
}

// Allocate word_size words from Metaspace.
MetaWord* ClassLoaderMetaspace::allocate(size_t word_size, Metaspace::MetadataType mdType) {
  if (Metaspace::is_class_space_allocation(mdType)) {
    return class_space_arena()->allocate(word_size);
  } else {
    return non_class_space_arena()->allocate(word_size);
  }
}

MetaWord* MetaspaceArena::allocate(size_t requested_word_size) {
  MutexLocker cl(lock(), Mutex::_no_safepoint_check_flag);
  UL2(trace, "requested " SIZE_FORMAT " words.", requested_word_size);

  MetaWord* p = NULL;
  const size_t raw_word_size = get_raw_word_size_for_requested_word_size(requested_word_size);

  // 1) Attempt to allocate from the free blocks list
  //    (Note: to reduce complexity, deallocation handling is disabled if allocation guards
  //     are enabled, see Settings::ergo_initialize())
  if (Settings::handle_deallocations() && _fbl != NULL && !_fbl->is_empty()) {
    p = _fbl->remove_block(raw_word_size);
    if (p != NULL) {
      DEBUG_ONLY(InternalStats::inc_num_allocs_from_deallocated_blocks();)
      UL2(trace, "taken from fbl (now: %d, " SIZE_FORMAT ").",
          _fbl->count(), _fbl->total_size());
      // Note: Space which is kept in the freeblock dictionary still counts as used as far
      //  as statistics go; therefore we skip the epilogue in this function to avoid double
      //  accounting.
      return p;
    }
  }

  bool current_chunk_too_small = false;
  bool commit_failure = false;

  if (current_chunk() != NULL) {

    // 2) Attempt to satisfy the allocation from the current chunk.

    // If the current chunk is too small to hold the requested size, attempt to enlarge it.
    // If that fails, retire the chunk.
    if (current_chunk()->free_words() < raw_word_size) {
      if (!attempt_enlarge_current_chunk(raw_word_size)) {
        current_chunk_too_small = true;
      } else {
        DEBUG_ONLY(InternalStats::inc_num_chunks_enlarged();)
        UL(debug, "enlarged chunk.");
      }
    }

    // Commit the chunk far enough to hold the requested word size. If that fails, we
    // hit a limit (either GC threshold or MaxMetaspaceSize). In that case retire the
    // chunk.
    if (!current_chunk_too_small) {
      if (!current_chunk()->ensure_committed_additional(raw_word_size)) {
        UL2(info, "commit failure (requested size: " SIZE_FORMAT ")", raw_word_size);
        commit_failure = true;
      }
    }

    // Allocate from the current chunk. This should work now.
    if (!current_chunk_too_small && !commit_failure) {
      p = current_chunk()->allocate(raw_word_size);
      assert(p != NULL, "Allocation from chunk failed.");
    }
  }

  if (p == NULL) {
    // If we are here, we either had no current chunk to begin with or it was deemed insufficient.
    assert(current_chunk() == NULL ||
           current_chunk_too_small || commit_failure, "Sanity");

    Metachunk* new_chunk = allocate_new_chunk(raw_word_size);
    if (new_chunk != NULL) {
      UL2(debug, "allocated new chunk " METACHUNK_FORMAT " for requested word size " SIZE_FORMAT ".",
          METACHUNK_FORMAT_ARGS(new_chunk), requested_word_size);

      assert(new_chunk->free_below_committed_words() >= raw_word_size, "Sanity");
      if (Settings::new_chunks_are_fully_committed()) {
        assert(new_chunk->is_fully_committed(), "Chunk should be fully committed.");
      }

      // We have a new chunk. Before making it the current chunk, retire the old one.
      if (current_chunk() != NULL) {
        salvage_chunk(current_chunk());
        DEBUG_ONLY(InternalStats::inc_num_chunks_retired();)
      }

      _chunks.add(new_chunk);

      // Now, allocate from that chunk. That should work.
      p = current_chunk()->allocate(raw_word_size);
      assert(p != NULL, "Allocation from chunk failed.");
    } else {
      UL2(info, "failed to allocate new chunk for requested word size " SIZE_FORMAT ".", requested_word_size);
    }
  }

#ifdef ASSERT
  // When using allocation guards, establish a prefix.
  if (p != NULL && Settings::use_allocation_guard()) {
    p = establish_prefix(p, raw_word_size);
  }
#endif

  if (p == NULL) {
    InternalStats::inc_num_allocs_failed_limit();
  } else {
    DEBUG_ONLY(InternalStats::inc_num_allocs();)
    _total_used_words_counter->increment_by(raw_word_size);
  }

  SOMETIMES(verify_locked();)

  if (p == NULL) {
    UL(info, "allocation failed, returned NULL.");
  } else {
    UL2(trace, "after allocation: %u chunk(s), current:" METACHUNK_FULL_FORMAT,
        _chunks.count(), METACHUNK_FULL_FORMAT_ARGS(current_chunk()));
    UL2(trace, "returning " PTR_FORMAT ".", p2i(p));
  }
  return p;
}
MetaWord* Metachunk::allocate(size_t request_word_size) {
  // Caller must have made sure this works
  assert(free_words() >= request_word_size, "Chunk too small.");
  assert(free_below_committed_words() >= request_word_size, "Chunk not committed.");
  MetaWord* const p = top();
  _used_words += request_word_size;
  SOMETIMES(verify();)
  return p;
}

##gdb调试栈

#0  metaspace::Metachunk::allocate (this=0x7ffff00c3a20, request_word_size=76) at /home/yym/openjdk17/jdk17-master/src/hotspot/share/memory/metaspace/metachunk.cpp:169
#1  0x00007ffff67a99d7 in metaspace::MetaspaceArena::allocate (this=0x7ffff00d20f0, requested_word_size=76)
    at /home/yym/openjdk17/jdk17-master/src/hotspot/share/memory/metaspace/metaspaceArena.cpp:278
#2  0x00007ffff5fe6ead in ClassLoaderMetaspace::allocate (this=0x7ffff00d0410, word_size=76, mdType=Metaspace::NonClassType)
    at /home/yym/openjdk17/jdk17-master/src/hotspot/share/memory/classLoaderMetaspace.cpp:96
#3  0x00007ffff67a7b07 in Metaspace::allocate (loader_data=0x7ffff00c6180, word_size=76, type=MetaspaceObj::TypeArrayU8Type)
    at /home/yym/openjdk17/jdk17-master/src/hotspot/share/memory/metaspace.cpp:888
#4  0x00007ffff67a7bf4 in Metaspace::allocate (loader_data=0x7ffff00c6180, word_size=76, type=MetaspaceObj::TypeArrayU8Type, __the_thread__=0x7ffff0028920)
    at /home/yym/openjdk17/jdk17-master/src/hotspot/share/memory/metaspace.cpp:908
#5  0x00007ffff6075e7f in Array<Klass*>::operator new (size=16, loader_data=0x7ffff00c6180, length=75, __the_thread__=0x7ffff0028920)
    at /home/yym/openjdk17/jdk17-master/src/hotspot/share/oops/array.inline.hpp:36
#6  0x00007ffff6075a22 in MetadataFactory::new_array<Klass*> (loader_data=0x7ffff00c6180, length=75, __the_thread__=0x7ffff0028920)
    at /home/yym/openjdk17/jdk17-master/src/hotspot/share/memory/metadataFactory.hpp:40
#7  0x00007ffff606bac7 in ConstantPool::allocate_resolved_klasses (this=0x7fffd9820c48, loader_data=0x7ffff00c6180, num_klasses=75, __the_thread__=0x7ffff0028920)
    at /home/yym/openjdk17/jdk17-master/src/hotspot/share/oops/constantPool.cpp:212
#8  0x00007ffff5fb05da in ClassFileParser::parse_constant_pool (this=0x7ffff7bfddd0, stream=0x7ffff003c240, cp=0x7fffd9820c48, length=1098, __the_thread__=0x7ffff0028920)
    at /home/yym/openjdk17/jdk17-master/src/hotspot/share/classfile/classFileParser.cpp:607
#9  0x00007ffff5fc1fe8 in ClassFileParser::parse_stream (this=0x7ffff7bfddd0, stream=0x7ffff003c240, __the_thread__=0x7ffff0028920)
    at /home/yym/openjdk17/jdk17-master/src/hotspot/share/classfile/classFileParser.cpp:5720
#10 0x00007ffff5fc179d in ClassFileParser::ClassFileParser (this=0x7ffff7bfddd0, stream=0x7ffff003c240, name=0x7fffe0498220, loader_data=0x7ffff00c6180, cl_info=0x7ffff7bfe000,
    pub_level=ClassFileParser::BROADCAST, __the_thread__=0x7ffff0028920) at /home/yym/openjdk17/jdk17-master/src/hotspot/share/classfile/classFileParser.cpp:5590
#11 0x00007ffff66339a1 in KlassFactory::create_from_stream (stream=0x7ffff003c240, name=0x7fffe0498220, loader_data=0x7ffff00c6180, cl_info=..., __the_thread__=0x7ffff0028920)
    at /home/yym/openjdk17/jdk17-master/src/hotspot/share/classfile/klassFactory.cpp:199
#12 0x00007ffff5fd2471 in ClassLoader::load_class (name=0x7fffe0498220, search_append_only=false, __the_thread__=0x7ffff0028920)
    at /home/yym/openjdk17/jdk17-master/src/hotspot/share/classfile/classLoader.cpp:1222
#13 0x00007ffff6b10a5a in SystemDictionary::load_instance_class_impl (class_name=0x7fffe0498220, class_loader=..., __the_thread__=0x7ffff0028920)
    at /home/yym/openjdk17/jdk17-master/src/hotspot/share/classfile/systemDictionary.cpp:1290
#14 0x00007ffff6b10e35 in SystemDictionary::load_instance_class (name_hash=1500110387, name=0x7fffe0498220, class_loader=..., __the_thread__=0x7ffff0028920)
    at /home/yym/openjdk17/jdk17-master/src/hotspot/share/classfile/systemDictionary.cpp:1356
#15 0x00007ffff6b0eefd in SystemDictionary::resolve_instance_class_or_null (name=0x7fffe0498220, class_loader=..., protection_domain=..., __the_thread__=0x7ffff0028920)
    at /home/yym/openjdk17/jdk17-master/src/hotspot/share/classfile/systemDictionary.cpp:724
#16 0x00007ffff6b0da82 in SystemDictionary::resolve_instance_class_or_null_helper (class_name=0x7fffe0498220, class_loader=..., protection_domain=...,
    __the_thread__=0x7ffff0028920) at /home/yym/openjdk17/jdk17-master/src/hotspot/share/classfile/systemDictionary.cpp:295
#17 0x00007ffff6b0d928 in SystemDictionary::resolve_or_null (class_name=0x7fffe0498220, class_loader=..., protection_domain=..., __the_thread__=0x7ffff0028920)
    at /home/yym/openjdk17/jdk17-master/src/hotspot/share/classfile/systemDictionary.cpp:278
#18 0x00007ffff6b0d86b in SystemDictionary::resolve_or_fail (class_name=0x7fffe0498220, class_loader=..., protection_domain=..., throw_error=true, __the_thread__=0x7ffff0028920)
    at /home/yym/openjdk17/jdk17-master/src/hotspot/share/classfile/systemDictionary.cpp:264
#19 0x00007ffff5da8a1a in SystemDictionary::resolve_or_fail (class_name=0x7fffe0498220, throw_error=true, __the_thread__=0x7ffff0028920)
    at /home/yym/openjdk17/jdk17-master/src/hotspot/share/classfile/systemDictionary.hpp:100
#20 0x00007ffff6bf767c in vmClasses::resolve (id=vmClassID::ClassLoader_klass_knum, __the_thread__=0x7ffff0028920)
    at /home/yym/openjdk17/jdk17-master/src/hotspot/share/classfile/vmClasses.cpp:99
#21 0x00007ffff6bf777a in vmClasses::resolve_until (limit_id=vmClassID::SoftReference_klass_knum, start_id=@0x7ffff7bfe8f0: vmClassID::Cloneable_klass_knum,
    __the_thread__=0x7ffff0028920) at /home/yym/openjdk17/jdk17-master/src/hotspot/share/classfile/vmClasses.cpp:108
#22 0x00007ffff6bf817e in vmClasses::resolve_through (last_id=vmClassID::Reference_klass_knum, start_id=@0x7ffff7bfe8f0: vmClassID::Cloneable_klass_knum,
    __the_thread__=0x7ffff0028920) at /home/yym/openjdk17/jdk17-master/src/hotspot/share/classfile/vmClasses.hpp:64
#23 0x00007ffff6bf7a07 in vmClasses::resolve_all (__the_thread__=0x7ffff0028920) at /home/yym/openjdk17/jdk17-master/src/hotspot/share/classfile/vmClasses.cpp:168
#24 0x00007ffff6b11cf6 in SystemDictionary::initialize (__the_thread__=0x7ffff0028920) at /home/yym/openjdk17/jdk17-master/src/hotspot/share/classfile/systemDictionary.cpp:1654
#25 0x00007ffff6b96cbf in Universe::genesis (__the_thread__=0x7ffff0028920) at /home/yym/openjdk17/jdk17-master/src/hotspot/share/memory/universe.cpp:335
#26 0x00007ffff6b99117 in universe2_init () at /home/yym/openjdk17/jdk17-master/src/hotspot/share/memory/universe.cpp:928
#27 0x00007ffff633fe73 in init_globals () at /home/yym/openjdk17/jdk17-master/src/hotspot/share/runtime/init.cpp:134
#28 0x00007ffff6b610b7 in Threads::create_vm (args=0x7ffff7bfed50, canTryAgain=0x7ffff7bfec5b) at /home/yym/openjdk17/jdk17-master/src/hotspot/share/runtime/thread.cpp:2852
#29 0x00007ffff644f775 in JNI_CreateJavaVM_inner (vm=0x7ffff7bfeda8, penv=0x7ffff7bfedb0, args=0x7ffff7bfed50) at /home/yym/openjdk17/jdk17-master/src/hotspot/share/prims/jni.cpp:3624
#30 0x00007ffff644fac1 in JNI_CreateJavaVM (vm=0x7ffff7bfeda8, penv=0x7ffff7bfedb0, args=0x7ffff7bfed50) at /home/yym/openjdk17/jdk17-master/src/hotspot/share/prims/jni.cpp:3712
#31 0x00007ffff7facd29 in InitializeJVM (pvm=0x7ffff7bfeda8, penv=0x7ffff7bfedb0, ifn=0x7ffff7bfee00) at /home/yym/openjdk17/jdk17-master/src/java.base/share/native/libjli/java.c:1541
#32 0x00007ffff7fa9623 in JavaMain (_args=0x7fffffffaed0) at /home/yym/openjdk17/jdk17-master/src/java.base/share/native/libjli/java.c:415
#33 0x00007ffff7fb08ab in ThreadJavaMain (args=0x7fffffffaed0) at /home/yym/openjdk17/jdk17-master/src/java.base/unix/native/libjli/java_md.c:651
#34 0x00007ffff7c94ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#35 0x00007ffff7d26850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

(Arxiv-2024)SwiftEdit:通过一步扩散实现闪电般快速的文本引导图像编辑

SwiftEdit&#xff1a;通过一步扩散实现闪电般快速的文本引导图像编辑 Paper是VinAI Research发表在Arxiv2024的工作 Paper Title:SwiftEdit: Lightning Fast Text-Guided Image Editing via One-Step Diffusion Code地址 Abstract 文本引导的图像编辑方面的最新进展利用了基于…

python langid识别一段字符串是哪国语言

分析&#xff1a; 在利用爬虫抓取亚马逊网站的数据时&#xff0c;有时会出现所抓页面的语言类型发生错误的情况&#xff08;如抓取沙特站数据时想要英文页面&#xff0c;抓到的确是阿拉伯语页面&#xff09;。在数据量大的时候人工排查这类异常情况是非常麻烦的&#xff0c;这时…

英特尔的创新困局与未来的转机:重塑还是消亡?

英特尔&#xff0c;这家曾引领全球半导体行业的巨头&#xff0c;如今正面临前所未有的挑战。从技术创新的停滞&#xff0c;到错失人工智能领域的制高点&#xff0c;再到被AMD和英伟达等竞争对手赶超&#xff0c;英特尔的创新之路似乎正走向尽头。但这是否意味着它的未来注定黯淡…

软考:系统架构设计师教材笔记(持续更新中)

教材中的知识点都会在。其实就是将教材中的废话删除&#xff0c;语言精练一下&#xff0c;内容比较多&#xff0c;没有标注重点 系统架构概述 定义 系统是指完成某一特定功能或一组功能所需要的组件集&#xff0c;而系统架构则是对所有组件的高层次结构表示&#xff0c;包括各…

No.1免费开源ERP:Odoo自定义字段添加到配置页中的技术分享

文 / 开源智造&#xff08;OSCG&#xff09; Odoo亚太金牌服务 在Odoo18之中&#xff0c;配置设定于管控各类系统配置层面发挥着关键之效用&#xff0c;使您能够对软件予以定制&#xff0c;以契合您特定的业务需求。尽管 Odoo 提供了一组强劲的默认配置选项&#xff0c;然而有…

YOLO11全解析:从原理到实战,全流程体验下一代目标检测

前言 一、模型介绍 二、网络结构 1.主干网络&#xff08;Backbone&#xff09; 2.颈部网络&#xff08;Neck&#xff09; 3.头部网络&#xff08;Head&#xff09; 三、算法改进 1.增强的特征提取 2.优化的效率和速度 3.更高的准确性与更少的参数 4.环境适应性强 5.…

虚幻引擎结构之ULevel

在虚幻引擎中&#xff0c;场景的组织和管理是通过子关卡&#xff08;Sublevel&#xff09;来实现的。这种设计不仅提高了资源管理的灵活性&#xff0c;还优化了游戏性能&#xff0c;特别是在处理大型复杂场景时。 1. 场景划分模式 虚幻引擎采用基于子关卡的场景划分模式。每个…

自动驾驶---Parking端到端架构

​​​​​​1 背景 自动泊车也是智能驾驶低速功能中比较重要的一部分&#xff0c;低速功能其中还包括记忆泊车&#xff0c;代客泊车等。传统的泊车算法通常使用基于规则或者搜索优化的方案来实现。然而&#xff0c;由于算法的复杂设计&#xff0c;这些方法在复杂的泊车场景中效…

[ffmpeg]编译 libx264

步骤 下载 libx264 git clone https://code.videolan.org/videolan/x264.git cd x264环境搭建 然后在开始菜单中找到并打开 x64 Native Tools Command Prompt for VS 2019 &#xff1a; 打开 msys2_shell.cmd -use-full-path 这时会打开 MSYS 的新窗口&#xff0c;先把一些汇…

华为管理变革之道:管理制度创新

目录 华为崛起两大因素&#xff1a;管理制度创新和组织文化。 管理是科学&#xff0c;150年来管理史上最伟大的创新是流程 为什么要变革&#xff1f; 向世界标杆学习&#xff0c;是变革第一方法论 体系之一&#xff1a;华为的DSTE战略管理体系&#xff08;解决&#xff1a…

【自留】Unity VR入门

帮老师写的&#xff0c;自留&#xff0c;不保证是很好的教程。 1.PICO开发指南&#xff08;官方&#xff09; 在该页面&#xff0c;能找到大部分能实现的功能&#xff0c;以及实现方式。非常推荐&#xff01;PICO Unity Integration SDK | PICO 开发者平台 2.如何快速入门&…

uniapp 项目基础搭建(vue2)

一 .创建项目 创建项目可以通过工具创建&#xff0c;也可以通过脚手架下载 1.通过工具创建 2.通过脚手架下载 安装脚手架 ​​npm install -g vue/cli 下载项目模板 vue create -p dcloudio/uni-preset-vue 项目名称 二. 下载相关依赖 1. 项目默认是没有package.json文件的&…

使用vcpkg安装opencv>=4.9后#include<opencv2/opencv.hpp>#include<opencv2/core.hpp>无效

使用vcpkg安装opencv>4.9后#include<opencv2/opencv.hpp>#include<opencv2/core.hpp>无效\无法查找或打开 至少从2024年开始&#xff0c;发布的vcpkg默认安装的opencv版本都是4.x版。4.8版本及以前&#xff0c;vcpkg编译后的opencv头文件目录是*/vcpkg/x64-win…

Kubernetes PV及PVC的使用

前提条件 拥有Kubernetes集群环境&#xff0c;可参考&#xff1a;Kubernetes集群搭建理解Kubernetes部署知识&#xff0c;可参考&#xff1a;使用Kubernetes部署第一个应用 、Deloyment控制器拥有NFS服务&#xff0c;可参考&#xff1a;Linux环境搭建NFS服务 概述 Persistent…

flink sink kafka

接上文&#xff1a;一文说清flink从编码到部署上线 之前写了kafka source&#xff0c;现在补充kafka sink。完善kafka相关操作。 环境说明&#xff1a;MySQL&#xff1a;5.7&#xff1b;flink&#xff1a;1.14.0&#xff1b;hadoop&#xff1a;3.0.0&#xff1b;操作系统&#…

【安全编码】Web平台如何设计防止重放攻击

我们先来做一道关于防重放的题&#xff0c;答案在文末 防止重放攻击最有效的方法是&#xff08; &#xff09;。 A.对用户密码进行加密存储使用 B.使用一次一密的加密方式 C.强制用户经常修改用户密码 D.强制用户设置复杂度高的密码 如果这道题目自己拿不准&#xff0c;或者…

Diagramming AI: 使用自然语言来生成各种工具图

前言 在画一些工具图时&#xff08;流程图、UML图、架构图&#xff09;&#xff0c;你还在往画布上一个个的拖拽组件来进行绘制么&#xff1f;今天介绍一款更有效率的画图工具&#xff0c;它能够通过简单的自然语言描述来完成一个个复杂的图。 首页 进入官网之后&#xff0c;我…

黑马Java面试教程_P9_MySQL

系列博客目录 文章目录 系列博客目录前言1. 优化1.1 MySQL中&#xff0c;如何定位慢查询&#xff1f;面试文稿 1.2 面试官接着问&#xff1a;那这个SQL语句执行很慢,如何分析 ( 如何优化&#xff09;呢?面试文稿 1.3 了解过索引吗?(什么是索引)1.4 继续问 索引的底层数据结构…

Windows11家庭版启动Hyper-V

Hyper-V 是微软的硬件虚拟化产品&#xff0c;允许在 Windows 上以虚拟机形式运行多个操作系统。每个虚拟机都在虚拟硬件上运行&#xff0c;可以创建虚拟硬盘驱动器、虚拟交换机等虚拟设备。使用虚拟化可以运行需要较旧版本的 Windows 或非 Windows 操作系统的软件&#xff0c;以…

第6章 图论

2024年12月25日一稿 &#x1f430;6.1 图的基本概念 6.1.1 图的定义和表示 6.1.2 图的同构 6.1.3 完全图与正则图 6.1.4 子图与补图 6.1.5 通路与回路 6.2 图的连通性 6.2.1 无向图的连通性 6.2.2 有向图的连通性 6.3 图的矩阵表示 6.3.1 关联矩阵 6.3.2 有向图的邻接矩阵…