mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-16 10:08:36 +03:00
0022293: Incorrect memory allocation for NCollection_IncAllocator on Windows 64 bit
This commit is contained in:
parent
98178592fc
commit
c99551fa0f
@ -13,9 +13,22 @@
|
|||||||
IMPLEMENT_STANDARD_HANDLE (NCollection_IncAllocator,NCollection_BaseAllocator)
|
IMPLEMENT_STANDARD_HANDLE (NCollection_IncAllocator,NCollection_BaseAllocator)
|
||||||
IMPLEMENT_STANDARD_RTTIEXT (NCollection_IncAllocator,NCollection_BaseAllocator)
|
IMPLEMENT_STANDARD_RTTIEXT (NCollection_IncAllocator,NCollection_BaseAllocator)
|
||||||
|
|
||||||
#define IMEM_SIZE(_size) ((((_size) - 1)/sizeof(aligned_t)) + 1)
|
namespace
|
||||||
#define IMEM_FREE(p_bl) ((unsigned int)(p_bl->p_end_block - p_bl->p_free_space))
|
{
|
||||||
#define IMEM_ALIGN(_addr) (sizeof(aligned_t)* IMEM_SIZE((unsigned long)(_addr)))
|
|
||||||
|
inline size_t IMEM_SIZE (const size_t theSize)
|
||||||
|
{
|
||||||
|
return (theSize - 1) / sizeof(NCollection_IncAllocator::aligned_t) + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline size_t IMEM_ALIGN (const void* theAddress)
|
||||||
|
{
|
||||||
|
return sizeof(NCollection_IncAllocator::aligned_t) * IMEM_SIZE (size_t(theAddress));
|
||||||
|
}
|
||||||
|
|
||||||
|
#define IMEM_FREE(p_bl) (size_t(p_bl->p_end_block - p_bl->p_free_space))
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
#define MaxLookup 16
|
#define MaxLookup 16
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user