Permalink
Browse files

Use M_NOWAIT for kernel allocations, so it gets easier to learn when …

…no memory left.
  • Loading branch information...
1 parent c963d5e commit 245dd846debd3baaf022001cfbbb88ce2579c5ca @pgj committed Aug 5, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 packages/mirage-platform/runtime/ocaml/misc.h
@@ -34,9 +34,9 @@
MALLOC_DECLARE(M_MIRAGE);
-#define __malloc(X) malloc(X, M_MIRAGE, M_WAITOK)
-#define __realloc(P,X) realloc(P,X, M_MIRAGE, M_WAITOK)
-#define __calloc(X,S) malloc(X*S, M_MIRAGE, M_WAITOK | M_ZERO)
+#define __malloc(X) malloc(X, M_MIRAGE, M_NOWAIT)
+#define __realloc(P,X) realloc(P,X, M_MIRAGE, M_NOWAIT)
+#define __calloc(X,S) malloc(X*S, M_MIRAGE, M_NOWAIT | M_ZERO)
#define __free(X) free(X, M_MIRAGE)
#else
#define __malloc(X) malloc(X)

0 comments on commit 245dd84

Please sign in to comment.