lib/mlnlffi-lib/memory/memalloc.sig
raw| 1 | (* memalloc.sig |
| 2 | * 2005 Matthew Fluet ([email protected]) |
| 3 | * Adapted for MLton. |
| 4 | *) |
| 5 | |
| 6 | (* memalloc.sig |
| 7 | * |
| 8 | * Primitives for "raw" memory allocation. |
| 9 | * |
| 10 | * Copyright (c) 2004 by The Fellowship of SML/NJ |
| 11 | * |
| 12 | * Author: Matthias Blume ([email protected]) |
| 13 | *) |
| 14 | signature CMEMALLOC = sig |
| 15 | |
| 16 | exception OutOfMemory |
| 17 | |
| 18 | eqtype addr' (* to avoid clash with addr from CMEMACCESS *) |
| 19 | |
| 20 | val alloc : word -> addr' (* may raise OutOfMemory *) |
| 21 | val free : addr' -> unit |
| 22 | end |