木头云 eede00165e fix(container_allocator): Fix MSVC compilation by correcting allocator semantics
ROOT CAUSE:
The allocate() function was incorrectly constructing objects during memory
allocation, violating C++ allocator requirements. MSVC's std::_Tree_node has
a deleted default constructor, causing compilation failure.

CHANGES:
- container_allocator::allocate() now only allocates raw memory without
  constructing objects (removed mem::$new and ipc::construct calls)
- container_allocator::deallocate() now only frees memory without
  destroying objects (removed mem::$delete and ipc::destroy_n calls)

WHY THIS FIXES THE ISSUE:
C++ allocator semantics require strict separation:
  * allocate()   -> raw memory allocation only
  * construct()  -> object construction with proper arguments
  * destroy()    -> object destruction
  * deallocate() -> memory deallocation only

Standard containers (like std::map) call construct() with proper arguments
(key, value) to initialize nodes, not allocate(). Since std::_Tree_node in
MSVC has no default constructor (= delete), attempting to construct it
without arguments always fails.

Fixes MSVC 2017 compilation error:
  error C2280: 'std::_Tree_node<...>::_Tree_node(void)':
  attempting to reference a deleted function
2025-12-01 09:24:58 +00:00
..
concur Add intrusive_stack 2025-03-09 18:02:51 +08:00
imp Refactoring the generic memory allocator 2025-03-09 18:02:51 +08:00
mem fix(container_allocator): Fix MSVC compilation by correcting allocator semantics 2025-12-01 09:24:58 +00:00
buffer.h IPC_EXPORT => LIBIPC_EXPORT 2025-03-09 18:02:51 +08:00
condition.h IPC_EXPORT => LIBIPC_EXPORT 2025-03-09 18:02:51 +08:00
def.h Start refactoring memory management, adding memory_resource 2025-03-09 18:02:51 +08:00
ipc.h IPC_EXPORT => LIBIPC_EXPORT 2025-03-09 18:02:51 +08:00
mutex.h IPC_EXPORT => LIBIPC_EXPORT 2025-03-09 18:02:51 +08:00
rw_lock.h reduce the number of recheck times for the sleep function 2021-09-20 23:29:30 +08:00
semaphore.h IPC_EXPORT => LIBIPC_EXPORT 2025-03-09 18:02:51 +08:00
shm.h IPC_EXPORT => LIBIPC_EXPORT 2025-03-09 18:02:51 +08:00