2020-06-18 07:29:44 +05:30
|
|
|
#include <malloc.h>
|
|
|
|
|
2022-01-22 01:17:21 +05:30
|
|
|
#include "test_util.h"
|
2022-01-02 18:00:34 +05:30
|
|
|
|
2020-06-18 07:29:44 +05:30
|
|
|
size_t malloc_object_size(void *ptr);
|
|
|
|
|
2022-01-02 18:00:34 +05:30
|
|
|
OPTNONE int main(void) {
|
2020-06-18 07:29:44 +05:30
|
|
|
char *p = malloc(16);
|
|
|
|
if (!p) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
char *q = p + 4096 * 4;
|
|
|
|
malloc_object_size(q);
|
|
|
|
return 0;
|
|
|
|
}
|