Parcourir la source

add legacy function valloc

it was already declared in stdlib.h, but not defined anywhere.
Rich Felker il y a 11 ans
Parent
commit
2f820f3b1f
1 fichiers modifiés avec 8 ajouts et 0 suppressions
  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);
+}