20 char *ptr = (
char *)pBlock;
27 if (pCtor !=
nullptr) {
30 char *p = (
char *)ptr;
54 char *p = (
char *)pBlock;
72 for (
char *p = (
char *)pBlock + size * n; n > 0; n--) {
86 if (pBlock !=
nullptr) {
87 if (pDtor !=
nullptr) {
88 u32 i, objects, objectsize;
89 objectsize = ((u32 *) ((
char *) pBlock - 16))[0];
90 objects = ((u32 *) ((
char *) pBlock - 16))[1];
92 char *p = (
char *) pBlock + objectsize * objects;
93 for (i = 0; i < objects; i++) {
99 delete[] ((
char *)pBlock - 16);
Guarantees the correct destruction of an array if an exception is thrown during its construction.
u32 mCurrNum
The number of currently constructed array elements.
void __destroy_new_array(void *pBlock, dtorPtr pDtor)
Destroys and deletes an array of objects.
void __destroy_arr(void *pBlock, dtorPtr pDtor, u32 size, u32 n)
Destroys an array of objects.
void __construct_array(void *pBlock, ctorPtr pCtor, dtorPtr pDtor, u32 size, u32 n)
Constructs an array of objects.
void * __construct_new_array(void *pBlock, ctorPtr pCtor, dtorPtr pDtor, u32 size, u32 n)
Allocates and constructs an array of objects.
void(* dtorPtr)(void *, int)
Destructor function pointer.
void(* ctorPtr)(void *, int)
Constructor function pointer.