'
This commit is contained in:
parent
1e895ef74a
commit
ac1b94ebc1
6 changed files with 43 additions and 0 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -1,3 +1,9 @@
|
|||
a.out
|
||||
*~
|
||||
*.swp
|
||||
*.o
|
||||
*.a
|
||||
*.so
|
||||
*.class
|
||||
*.log
|
||||
*.core
|
||||
|
|
|
|||
18
malloc/Makefile
Normal file
18
malloc/Makefile
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
CC=gcc
|
||||
CFLAGS=
|
||||
LDFLAGS=
|
||||
|
||||
SRCS=
|
||||
OBJS=${SRC:.c=.o}
|
||||
TARGET=libmalloc.so
|
||||
|
||||
library: $(OBJS)
|
||||
$(CC) -shared -o $(TARGET) $^
|
||||
|
||||
debug:
|
||||
|
||||
check:
|
||||
|
||||
clean:
|
||||
$(RM) *.o
|
||||
$(RM) $(TARGET)
|
||||
19
malloc/src/malloc.c
Normal file
19
malloc/src/malloc.c
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#include <stddef.h>
|
||||
|
||||
__attribute__((visibility("default"))) void *malloc(size_t size)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
__attribute__((visibility("default"))) void free(void *ptr)
|
||||
{}
|
||||
|
||||
__attribute__((visibility("default"))) void *realloc(void *ptr, size_t size)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
__attribute__((visibility("default"))) void *calloc(size_t nmemb, size_t size)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
BIN
malloc/tests/corruptionproof
Executable file
BIN
malloc/tests/corruptionproof
Executable file
Binary file not shown.
BIN
malloc/tests/memoryfootprint
Executable file
BIN
malloc/tests/memoryfootprint
Executable file
Binary file not shown.
BIN
malloc/tests/speed
Executable file
BIN
malloc/tests/speed
Executable file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue