@@ -138,13 +138,13 @@ return page; } } - page = of_malloc(1, sizeof(*page)); + page = of_alloc(1, sizeof(*page)); @try { - page->map = of_calloc(1, mapSize); + page->map = of_alloc_zeroed(1, mapSize); } @catch (id e) { free(page); @throw e; } @try { @@ -292,11 +292,11 @@ size_t i; if (preallocatedPages != NULL) @throw [OFInvalidArgumentException exception]; - preallocatedPages = of_calloc(numPages, sizeof(struct page)); + preallocatedPages = of_alloc_zeroed(numPages, sizeof(struct page)); # if !defined(OF_HAVE_COMPILER_TLS) && defined(OF_HAVE_THREADS) of_tlskey_set(preallocatedPagesKey, preallocatedPages); # endif @try { @@ -413,11 +413,11 @@ if (count > SIZE_MAX / itemSize) @throw [OFOutOfRangeException exception]; if (allowsSwappableMemory) { - _items = of_malloc(count, itemSize); + _items = of_alloc(count, itemSize); _freeWhenDone = true; memset(_items, 0, count * itemSize); #if defined(HAVE_MMAP) && defined(HAVE_MLOCK) && defined(MAP_ANON) } else if (count * itemSize >= pageSize) _items = mapPages(OF_ROUND_UP_POW2(pageSize,