Dokumentacja klasy Memory::Heap::heapbox

#include <heap.hpp>

Lista wszystkich składowych.

Metody publiczne

void unAnchorBlock (block_free *item)
int take_block (block_free *item, uint32 facility, int(*destruct)(class heapbox *, void *))
addr_t morecor (uint32 cnt, bool alloc_pgs)
int knew_used (void *ptr, uint32 size, uint32 facility, int(destructor)(class heapbox *, void *))
block_freeklastfree ()
uint32 blsize (char *ptr)
block_usedkget_info (void *ptr)
void kdefragment (void *ptr)
int resize_used_blocks_table ()
void * mallocFuncPr (size_t size, size_t alignment, uint32 facility, int(*destruct)(class heapbox *, void *), uint32 MallocState)
void * mallocFunc (size_t size, size_t alignment, uint32 facility, int(*destruct)(class heapbox *, void *), uint32 MallocState)
int freeFuncPr (void *ptr, uint32 FreeState)
int freeFunc (void *ptr, uint32 FreeState)
int freeFunc2 (void *ptr, uint32 FreeState)
int freeFuncPr2 (void *ptr, uint32 FreeState)
 heapbox ()
void init (block_used *usd, size_t max_blcks, block_free *fir, const char *nam)
void destruct ()
void * malloc (size_t size, size_t alignment, uint32 facility, int(*destruct)(class heapbox *, void *))
void * malloc (size_t size, size_t alignment, const char *name, int(*destruct)(class heapbox *, void *))
int free (void *ptr)
uint32 allocated_count ()
void unAnchorBlock (block_free *item)
void take_block (block_free *item, uint32 facility, int(*destruct)(class heapbox *, void *))
addr_t morecor (uint32 cnt, uint32 alloc_pgs)
int knew_used (void *ptr, uint32 size, uint32 facility, int(destructor)(class heapbox *, void *))
block_freeklastfree ()
uint32 blsize (char *ptr)
block_usedkget_info (void *ptr)
void kdefragment (void *ptr)
int resize_used_blocks_table ()
void * mallocFunc (size_t size, size_t alignment, uint32 facility, int(*destruct)(class heapbox *, void *), uint32 MallocState)
int freeFunc (void *ptr, uint32 FreeState)
 heapbox ()
void init (block_used *usd, size_t max_blcks, block_free *fir, char *nam)
void destruct ()
void * malloc (size_t size, size_t alignment, uint32 facility, int(*destruct)(class heapbox *, void *))
void * malloc (size_t size, size_t alignment, const char *name, int(*destruct)(class heapbox *, void *))
int free (void *ptr)
uint32 allocated_count ()

Atrybuty publiczne

class blist_t VirtAddrs
block_usedused
uint32 begin_search
size_t max_blocks
block_freefirst
bool volatile NowResizingUsed
IPC::Lock::lock_t lock_heap
struct {
   uint32 volatile   allocs
   uint32 volatile   max
   uint32 volatile   used
stats
char name [HEAPBOX_NAME]
uint32 heapbox_no
struct blist_smorecor_new_node
uint32 volatile NowResizingUsed
struct {
   uint32 volatile   allocs
   uint32 volatile   max
   uint32 volatile   used
stats


Opis szczegółowy

Definicja w linii 108 pliku heap.hpp.


Dokumentacja konstruktora i destruktora

Memory::Heap::heapbox::heapbox (  ) 

Definicja w linii 62 pliku heap.cpp.

Odwołuje się do IPC::Lock::lock_t::init() i lock_heap.

Memory::Heap::heapbox::heapbox (  ) 


Dokumentacja funkcji składowych

void Memory::Heap::heapbox::unAnchorBlock ( block_free item  ) 

int Memory::Heap::heapbox::take_block ( block_free item,
uint32  facility,
int(*)(class heapbox *, void *)  destruct 
)

Odwołania w mallocFuncPr().

addr_t Memory::Heap::heapbox::morecor ( uint32  cnt,
bool  alloc_pgs 
)

int Memory::Heap::heapbox::knew_used ( void *  ptr,
uint32  size,
uint32  facility,
int(destructor)(class heapbox *, void *)   
)

block_free * Memory::Heap::heapbox::klastfree (  ) 

Definicja w linii 872 pliku heap.cpp.

Odwołuje się do first.

Odwołania w freeFuncPr() i freeFuncPr2().

uint32 Memory::Heap::heapbox::blsize ( char *  ptr  ) 

Definicja w linii 860 pliku heap.cpp.

Odwołuje się do kget_info() i NULL.

block_used * Memory::Heap::heapbox::kget_info ( void *  ptr  ) 

void Memory::Heap::heapbox::kdefragment ( void *  ptr  ) 

Definicja w linii 1143 pliku heap.cpp.

Odwołuje się do Memory::Heap::countMagic().

Odwołania w freeFuncPr(), freeFuncPr2() i morecor().

int Memory::Heap::heapbox::resize_used_blocks_table (  ) 

void * Memory::Heap::heapbox::mallocFuncPr ( size_t  size,
size_t  alignment,
uint32  facility,
int(*)(class heapbox *, void *)  destruct,
uint32  MallocState 
)

void * Memory::Heap::heapbox::mallocFunc ( size_t  size,
size_t  alignment,
uint32  facility,
int(*)(class heapbox *, void *)  destruct,
uint32  MallocState 
)

int Memory::Heap::heapbox::freeFuncPr ( void *  ptr,
uint32  FreeState 
)

int Memory::Heap::heapbox::freeFunc ( void *  ptr,
uint32  FreeState 
)

FreeState may be 0 or MALLOC_NOLOCKS. In the former, the heap is locked on during operation. free block; points to data part

Definicja w linii 986 pliku heap.cpp.

Odwołuje się do assert, complain, destruct(), freeFuncPr(), freeze, kget_info(), null i used.

Odwołania w free() i resize_used_blocks_table().

int Memory::Heap::heapbox::freeFunc2 ( void *  ptr,
uint32  FreeState 
)

int Memory::Heap::heapbox::freeFuncPr2 ( void *  ptr,
uint32  FreeState 
)

void Memory::Heap::heapbox::init ( block_used usd,
size_t  max_blcks,
block_free fir,
const char *  nam 
)

void Memory::Heap::heapbox::destruct (  ) 

void * Memory::Heap::heapbox::malloc ( size_t  size,
size_t  alignment,
uint32  facility,
int(*)(class heapbox *, void *)  destruct 
)

allocate memory. aligns up the requested size to HEAP_MIN_BLOCK, min block size HEAP. Malloc will find a chunk of memory aligned as size_t alignment. Facility is build of FAC_* consts or'ed, or a pointer to a const char *. It is advisable that in the first case the value is less than 0xc000_0000 and the other, that the pointer is above 0xc000_0000. MallocState tells malloc to function as said: const uint32 MALLOC_NORESCUE = 1; // this means mallocFunc() is being called from resize_used_blocks_table() and it should not attempt to resize the table (which, probably has only one left entry) const uint32 MALLOC_NOLOCKS = 2; // mallocFunc() will not lock, or ulock the heap entity. This is useful for recursive malloc()ing, which happens if memory is insufficient and a morecor() is called.

Błąd:
ciezka sekcja krytyczna, zeby malloc uzywac

Definicja w linii 806 pliku heap.cpp.

Odwołuje się do _PF, destruct(), mallocFunc() i Preturn.

Odwołania w Thread::Timer::add(), blist_t::add(), Thread::process_t::alloc_stack(), Memory::Pager::allocate_memtree(), Net::Arp::arp_get_ether(), blistsort_add(), blistsort_ptr(), Module::init(), Collection::Mem::kmalloc(), malloc(), Net::pbuf_alloc() i blist_t::ptr().

void * Memory::Heap::heapbox::malloc ( size_t  size,
size_t  alignment,
const char *  name,
int(*)(class heapbox *, void *)  destruct 
)

Definicja w linii 818 pliku heap.cpp.

Odwołuje się do destruct() i malloc().

int Memory::Heap::heapbox::free ( void *  ptr  ) 

void Memory::Heap::heapbox::unAnchorBlock ( block_free item  ) 

void Memory::Heap::heapbox::take_block ( block_free item,
uint32  facility,
int(*)(class heapbox *, void *)  destruct 
)

addr_t Memory::Heap::heapbox::morecor ( uint32  cnt,
uint32  alloc_pgs 
)

int Memory::Heap::heapbox::knew_used ( void *  ptr,
uint32  size,
uint32  facility,
int(destructor)(class heapbox *, void *)   
)

block_free* Memory::Heap::heapbox::klastfree (  ) 

uint32 Memory::Heap::heapbox::blsize ( char *  ptr  ) 

block_used* Memory::Heap::heapbox::kget_info ( void *  ptr  ) 

void Memory::Heap::heapbox::kdefragment ( void *  ptr  ) 

int Memory::Heap::heapbox::resize_used_blocks_table (  ) 

void* Memory::Heap::heapbox::mallocFunc ( size_t  size,
size_t  alignment,
uint32  facility,
int(*)(class heapbox *, void *)  destruct,
uint32  MallocState 
)

int Memory::Heap::heapbox::freeFunc ( void *  ptr,
uint32  FreeState 
)

void Memory::Heap::heapbox::init ( block_used usd,
size_t  max_blcks,
block_free fir,
char *  nam 
)

void Memory::Heap::heapbox::destruct (  ) 

void* Memory::Heap::heapbox::malloc ( size_t  size,
size_t  alignment,
uint32  facility,
int(*)(class heapbox *, void *)  destruct 
)

void* Memory::Heap::heapbox::malloc ( size_t  size,
size_t  alignment,
const char *  name,
int(*)(class heapbox *, void *)  destruct 
)

int Memory::Heap::heapbox::free ( void *  ptr  ) 

uint32 Memory::Heap::heapbox::allocated_count (  ) 


Dokumentacja atrybutów składowych

Definicja w linii 112 pliku heap.hpp.

Odwołania w Memory::Heap::allocate_heapbox(), destruct() i morecor().

Definicja w linii 114 pliku heap.hpp.

Odwołania w freeFuncPr() i freeFuncPr2().

Definicja w linii 117 pliku heap.hpp.

Odwołania w mallocFuncPr().

Definicja w linii 118 pliku heap.hpp.

Odwołania w freeFuncPr(), heapbox(), init() i mallocFuncPr().

Definicja w linii 120 pliku heap.hpp.

Odwołania w debug_heap_stats().

Definicja w linii 121 pliku heap.hpp.

Odwołania w Memory::Heap::allocate_heapbox() i debug_heap_stats().

Definicja w linii 122 pliku heap.hpp.

Definicja w linii 124 pliku heap.hpp.

Odwołania w debug_heap_stats(), init() i VarieteThread().

Definicja w linii 125 pliku heap.hpp.

Odwołania w Memory::Heap::allocate_heapbox(), init(), kget_info() i mallocFuncPr().

Definicja w linii 126 pliku heap.hpp.

Odwołania w Memory::Heap::allocate_heapbox(), mallocFunc() i morecor().

Definicja w linii 665 pliku ip.old.2.cpp.


Dokumentacja dla tej klasy została wygenerowana z plików:

Wygenerowano Sat Jul 19 02:21:27 2008 dla panaLiX programem  doxygen 1.5.6