Home
last modified time | relevance | path

Searched refs:allocator (Results 1 – 8 of 8) sorted by relevance

/bionic/tests/
Dbionic_allocator_test.cpp65 BionicAllocator allocator; in TEST() local
66 void* ptr = allocator.alloc(0); in TEST()
68 allocator.free(ptr); in TEST()
72 BionicAllocator allocator; in TEST() local
73 allocator.free(nullptr); in TEST()
77 BionicAllocator allocator; in TEST() local
78 uint32_t* array = reinterpret_cast<uint32_t*>(allocator.alloc(512)); in TEST()
92 uint32_t* reallocated_ptr = reinterpret_cast<uint32_t*>(allocator.realloc(array, 1024)); in TEST()
103 reallocated_ptr = reinterpret_cast<uint32_t*>(allocator.realloc(array, 62)); in TEST()
107 reallocated_ptr = reinterpret_cast<uint32_t*>(allocator.realloc(array, 4000)); in TEST()
[all …]
Dpthread_test.cpp2529 StrictAlignmentAllocator allocator; in TEST() local
2531 allocator.allocate(sizeof(pthread_mutex_t), 4)); in TEST()
2538 allocator.allocate(sizeof(pthread_cond_t), 4)); in TEST()
2545 allocator.allocate(sizeof(pthread_rwlock_t), 4)); in TEST()
DAndroid.bp1041 // The Bionic allocator has its own C++ API. It isn't packaged into its
/bionic/linker/
Dlinker_block_allocator_test.cpp64 LinkerTypeAllocator<test_struct_nominal> allocator; in TEST() local
66 test_struct_nominal* ptr1 = allocator.alloc(); in TEST()
69 test_struct_nominal* ptr2 = allocator.alloc(); in TEST()
77 allocator.free(ptr1); in TEST()
78 allocator.free(ptr2); in TEST()
82 LinkerTypeAllocator<test_struct_small> allocator; in TEST() local
84 char* ptr1 = reinterpret_cast<char*>(allocator.alloc()); in TEST()
85 char* ptr2 = reinterpret_cast<char*>(allocator.alloc()); in TEST()
95 LinkerTypeAllocator<test_struct_larger> allocator; in TEST() local
97 test_struct_larger* ptr1 = allocator.alloc(); in TEST()
[all …]
/bionic/docs/
Dnative_allocator.md2 This document describes how to verify the native memory allocator on Android.
3 This procedure should be followed when upgrading or moving to a new allocator.
10 It is important to note that there are two modes for a native allocator
11 to run in on Android. The first is the normal allocator, the second is
21 When evaluating a native allocator, make sure that you benchmark both
26 a native allocator needs to implement.
51 These are mallopt options that Android requires for a native allocator
56 allocator will attempt to purge and release any unused memory back to the
60 When set to non-zero, `mallopt(M_DECAY_TIME, 1)`, an allocator can delay the
61 purge and release action. The amount of delay is up to the allocator
[all …]
/bionic/libc/bionic/
Dbionic_elf_tls.cpp228 BionicAllocator& allocator = __libc_shared_globals()->tls_allocator; in update_tls_dtv() local
247 TlsDtv* const new_dtv = static_cast<TlsDtv*>(allocator.alloc(dtv_size_in_bytes(new_cnt))); in update_tls_dtv()
272 allocator.free(dtv->modules[i]); in update_tls_dtv()
336 BionicAllocator& allocator = __libc_shared_globals()->tls_allocator; in __free_dynamic_tls() local
354 allocator.free(dtv->modules[i]); in __free_dynamic_tls()
360 allocator.free(dtv); in __free_dynamic_tls()
Dbionic_allocator.cpp360 BionicSmallObjectAllocator* allocator = get_small_object_allocator(info->type); in realloc() local
361 if (allocator != info->allocator_addr) { in realloc()
365 old_size = allocator->get_block_size(); in realloc()
388 BionicSmallObjectAllocator* allocator = get_small_object_allocator(info->type); in free() local
389 if (allocator != info->allocator_addr) { in free()
393 allocator->free(ptr); in free()
/bionic/libc/
DAndroid.bp117 // Defaults for native allocator libs/includes to make it