mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
DLL_HEADER for BlockAllocator (used in BoxTree)
This commit is contained in:
parent
bd600f48ac
commit
1d62ca31ac
@ -26,39 +26,13 @@ private:
|
|||||||
mutex block_allocator_mutex;
|
mutex block_allocator_mutex;
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
BlockAllocator (unsigned asize, unsigned ablocks = 100);
|
DLL_HEADER BlockAllocator (unsigned asize, unsigned ablocks = 100);
|
||||||
///
|
///
|
||||||
~BlockAllocator ();
|
DLL_HEADER ~BlockAllocator ();
|
||||||
///
|
///
|
||||||
|
DLL_HEADER void * Alloc ();
|
||||||
void * Alloc ();
|
|
||||||
/*
|
|
||||||
{
|
|
||||||
if (!freelist)
|
|
||||||
Alloc2();
|
|
||||||
|
|
||||||
void * p = freelist;
|
|
||||||
// freelist = *(void**)freelist;
|
|
||||||
freelist = *static_cast<void**> (freelist);
|
|
||||||
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
///
|
///
|
||||||
void Free (void * p);
|
DLL_HEADER void Free (void * p);
|
||||||
/*
|
|
||||||
{
|
|
||||||
if (!bablocks.Size()) return;
|
|
||||||
*(void**)p = freelist;
|
|
||||||
freelist = p;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
|
||||||
// void Alloc2 ();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user