Skip to content

Commit cf48f1b

Browse files
author
Emery Berger
committed
Adds libc_memalign.
1 parent 700981c commit cf48f1b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

wrappers/wrapper.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ extern "C" {
3434
void * xxmalloc (size_t);
3535
void xxfree (void *);
3636
void * xxmemalign(size_t, size_t);
37-
#if HL_USE_XXREALLOC
37+
#if HL_USE_XXREALLOC
3838
void * xxrealloc(void *, size_t);
39-
#endif
39+
#endif
4040
// Takes a pointer and returns how much space it holds.
4141
size_t xxmalloc_usable_size (void *);
4242

@@ -45,7 +45,7 @@ extern "C" {
4545

4646
// Unlocks the heap(s), after fork().
4747
void xxmalloc_unlock();
48-
48+
4949
}
5050

5151
#if defined(__APPLE__)
@@ -578,10 +578,13 @@ extern "C" void* __libc_malloc(size_t n) __attribute__((visibility("defau
578578
extern "C" void __libc_free(void* p) __attribute__((visibility("default")));
579579
extern "C" void* __libc_calloc(size_t a,size_t b) __attribute__((visibility("default")));
580580
extern "C" void* __libc_realloc(void* p,size_t n) __attribute__((visibility("default")));
581+
extern "C" void* __libc_memalign(size_t a, size_t b) __attribute__((visibility("default")));
581582

582583
extern "C" void* __libc_malloc(size_t n){ return CUSTOM_MALLOC(n); }
583584
extern "C" void __libc_free(void* p){ CUSTOM_FREE(p); }
584585
extern "C" void* __libc_calloc(size_t a,size_t b){ return CUSTOM_CALLOC(a,b); }
585586
extern "C" void* __libc_realloc(void* p,size_t n){ return CUSTOM_REALLOC(p,n); }
587+
extern "C" void* __libc_memalign(size_t a, size_t b){ return CUSTOM_MEMALIGN(a,b); }
588+
586589
#endif
587590

0 commit comments

Comments
 (0)