Expand description
Memory management (§58, §85 Phase 1).
Wraps the allocator hooks from crate::abi::allocator for use by the XML
implementation modules. This module provides the internal Rust interface
to the allocator system.
§UPSTREAM-PARITY
libxml2 exposes several memory management APIs:
xmlMemSetup/xmlMemGet— set/get custom allocator hooksxmlGcMemSetup/xmlGcMemGet— GC-aware variants (now identical)xmlMalloc/xmlMallocAtomic/xmlRealloc/xmlFree/xmlMemStrdupxmlMallocZero/xmlMallocAtomicZero/xmlReallocZeroxmlMemUsed/xmlMemBlocks— debugging statisticsxmlMemDisplay/xmlMemShow— debugging outputxmlInitMemory/xmlCleanupMemory— lifecycle
All of these are implemented in crate::abi::allocator. This module
re-exports them for internal use.
§Phase 1 status
Complete — all memory functions delegate to the ABI allocator layer.
Re-exports§
pub use crate::abi::allocator::xmlFree;pub use crate::abi::allocator::xmlInitMemory;pub use crate::abi::allocator::xmlMalloc;pub use crate::abi::allocator::xmlMallocAtomic;pub use crate::abi::allocator::xmlMallocAtomicZero;pub use crate::abi::allocator::xmlMallocZero;pub use crate::abi::allocator::xmlMemBlocks;pub use crate::abi::allocator::xmlMemDisplay;pub use crate::abi::allocator::xmlMemGet;pub use crate::abi::allocator::xmlMemSetup;pub use crate::abi::allocator::xmlMemShow;pub use crate::abi::allocator::xmlMemStrdup;pub use crate::abi::allocator::xmlMemUsed;pub use crate::abi::allocator::xmlRealloc;pub use crate::abi::allocator::xmlReallocZero;
Functions§
- cleanup_
memory - Clean up the memory subsystem.
- init_
memory - Initialize the memory subsystem.