Fix realloc bug
Move alloc_test to user-space