Explorar o código

add legacy function valloc

it was already declared in stdlib.h, but not defined anywhere.
Rich Felker %!s(int64=11) %!d(string=hai) anos
pai
achega
2f820f3b1f
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      src/legacy/valloc.c

+ 8 - 0
src/legacy/valloc.c

@@ -0,0 +1,8 @@
+#define _BSD_SOURCE
+#include <stdlib.h>
+#include <limits.h>
+
+void *valloc(size_t size)
+{
+	return memalign(PAGE_SIZE, size);
+}