mySize = aSize - IMEM_SIZE(sizeof(IBlock));
myMemSize = aSize * sizeof(aligned_t);
if (aBlock == NULL)
- Standard_OutOfMemory::Raise("NCollection_IncAllocator: out of memory");
+ throw Standard_OutOfMemory("NCollection_IncAllocator: out of memory");
aBlock -> p_free_space = (aligned_t *) IMEM_ALIGN (&aBlock[1]);
aBlock -> p_end_block = ((aligned_t *) aBlock) + aSize;
aBlock -> p_next = NULL;
if (aResult)
myFirstBlock -> p_free_space = myFirstBlock -> p_end_block;
else
- Standard_OutOfMemory::Raise("NCollection_IncAllocator: out of memory");
+ throw Standard_OutOfMemory("NCollection_IncAllocator: out of memory");
} else
if (cSize <= IMEM_FREE(myFirstBlock)) {
/* If the requested size fits into the free space in the 1st block */
{
const size_t aDefault = IMEM_SIZE(DefaultBlockSize);
if (cSize > aDefault)
- Standard_OutOfMemory::Raise("NCollection_IncAllocator: out of memory");
+ throw Standard_OutOfMemory("NCollection_IncAllocator: out of memory");
else
{
aResult = (aligned_t *) allocateNewBlock (aDefault);
if (aResult)
myFirstBlock -> p_free_space = aResult + cSize;
else
- Standard_OutOfMemory::Raise("NCollection_IncAllocator: out of memory");
+ throw Standard_OutOfMemory("NCollection_IncAllocator: out of memory");
}
}
}
}
else
{
- Standard_OutOfMemory::Raise("NCollection_IncAllocator: out of memory");
+ throw Standard_OutOfMemory("NCollection_IncAllocator: out of memory");
}
return aResult;
}