forked from bloomberg/memray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`pvalloc` is a `glibc` extension as is not always available in the system. To simplify the test suite, add stubs for `pvalloc` if is not defined and skip the tests that involve this allocator if is not available. Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
- Loading branch information
Showing
6 changed files
with
39 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include <malloc.h> | ||
#include <stdlib.h> | ||
|
||
#ifndef __GLIBC__ | ||
extern "C" { | ||
void* | ||
pvalloc(size_t size) | ||
{ | ||
return NULL; | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
cdef extern from "<stdlib.h>" nogil: | ||
cdef extern from "alloc.h" nogil: | ||
void *calloc (size_t count, size_t eltsize) | ||
void free (void *ptr) | ||
void *malloc (size_t size) | ||
int posix_memalign(void** memptr, size_t alignment, size_t size) | ||
void *realloc (void *ptr, size_t newsize) | ||
void* valloc(size_t size) | ||
|
||
cdef extern from "<malloc.h>" nogil: | ||
void* memalign(size_t alignment, size_t size) | ||
void* pvalloc(size_t size) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters