ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
xml_allocator Struct Reference
Inheritance diagram for xml_allocator:
Inheritance graph
[legend]
Collaboration diagram for xml_allocator:
Collaboration graph
[legend]

Public Member Functions

 xml_allocator (xml_memory_page *root)
 
xml_memory_pageallocate_page (size_t data_size)
 
void * allocate_memory_oob (size_t size, xml_memory_page *&out_page)
 
void * allocate_memory (size_t size, xml_memory_page *&out_page)
 
void deallocate_memory (void *ptr, size_t size, xml_memory_page *page)
 
char_t * allocate_string (size_t length)
 
void deallocate_string (char_t *string)
 

Static Public Member Functions

static void deallocate_page (xml_memory_page *page)
 

Public Attributes

xml_memory_page_root
 
size_t _busy_size
 

Detailed Description

Definition at line 343 of file pugixml.cpp.

Constructor & Destructor Documentation

◆ xml_allocator()

xml_allocator::xml_allocator ( xml_memory_page root)
inline

Definition at line 345 of file pugixml.cpp.

Member Function Documentation

◆ allocate_memory()

void* xml_allocator::allocate_memory ( size_t  size,
xml_memory_page *&  out_page 
)
inline

Definition at line 374 of file pugixml.cpp.

References _busy_size, _root, allocate_memory_oob(), xml_memory_page::data, and xml_memory_page_size.

Referenced by allocate_attribute(), allocate_node(), and allocate_string().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ allocate_memory_oob()

PUGI__FN_NO_INLINE void * xml_allocator::allocate_memory_oob ( size_t  size,
xml_memory_page *&  out_page 
)

Definition at line 477 of file pugixml.cpp.

References _busy_size, _root, allocate_page(), xml_memory_page::busy_size, xml_memory_page::data, xml_memory_page::next, xml_memory_page::prev, and xml_memory_page_size.

Referenced by allocate_memory().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ allocate_page()

xml_memory_page* xml_allocator::allocate_page ( size_t  data_size)
inline

Definition at line 347 of file pugixml.cpp.

References _root, xml_memory_management_function_storage< T >::allocate, xml_memory_page::allocator, xml_memory_page::construct(), xml_memory_page::memory, offsetof, and xml_memory_page_alignment.

Referenced by allocate_memory_oob().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ allocate_string()

char_t* xml_allocator::allocate_string ( size_t  length)
inline

Definition at line 424 of file pugixml.cpp.

References allocate_memory(), xml_memory_page::busy_size, xml_memory_page::data, xml_memory_string_header::full_size, length(), xml_memory_string_header::page_offset, and uint16_t.

Referenced by strcpy_insitu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deallocate_memory()

void xml_allocator::deallocate_memory ( void *  ptr,
size_t  size,
xml_memory_page page 
)
inline

Definition at line 388 of file pugixml.cpp.

References _busy_size, _root, xml_memory_page::busy_size, xml_memory_page::data, deallocate_page(), xml_memory_page::freed_size, xml_memory_page::next, and xml_memory_page::prev.

Referenced by deallocate_string(), destroy_attribute(), and destroy_node().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deallocate_page()

static void xml_allocator::deallocate_page ( xml_memory_page page)
inlinestatic

Definition at line 370 of file pugixml.cpp.

References xml_memory_management_function_storage< T >::deallocate, and xml_memory_page::memory.

Referenced by deallocate_memory().

Here is the caller graph for this function:

◆ deallocate_string()

void xml_allocator::deallocate_string ( char_t *  string)
inline

Definition at line 453 of file pugixml.cpp.

References xml_memory_page::busy_size, deallocate_memory(), xml_memory_string_header::full_size, offsetof, and xml_memory_string_header::page_offset.

Referenced by destroy_attribute(), destroy_node(), and strcpy_insitu().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _busy_size

size_t xml_allocator::_busy_size

Definition at line 474 of file pugixml.cpp.

Referenced by allocate_memory(), allocate_memory_oob(), and deallocate_memory().

◆ _root

xml_memory_page* xml_allocator::_root

The documentation for this struct was generated from the following file: