Seems like this is the only way to do it, if you want to allocate memory for a struct pointer:

Code:
Obj * A;

A = sys_malloc(sizeof((*Obj)));

Edit: note that you need the aditional () around *Obj, otherwise sizeof will return 0
Edit2: nvm. this one doesn't seem to work in all cases

Last edited by Kartoffel; 12/07/15 14:54.

POTATO-MAN saves the day! - Random