Hi Carsten, How about this... gcc -std=c99 -O3 -Wall -o x x.c --------8<-------- #include <stdlib.h> #include <stdio.h> int alloc(size_t n, void* p) { void* a; a = malloc(n); *(void**)p = a; return a == NULL; } int main(void) { int *a, res; res = alloc(10, &a); free(a); return 0; } -------->8-------- HTH, --Eljay