Move memory corruption tests up a directory
This commit is contained in:
12
test/malloc_object_size.c
Normal file
12
test/malloc_object_size.c
Normal file
@@ -0,0 +1,12 @@
|
||||
#include <stdbool.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#include "test_util.h"
|
||||
|
||||
size_t malloc_object_size(void *ptr);
|
||||
|
||||
OPTNONE int main(void) {
|
||||
char *p = malloc(16);
|
||||
size_t size = malloc_object_size(p);
|
||||
return size != (SLAB_CANARY ? 24 : 32);
|
||||
}
|
||||
Reference in New Issue
Block a user