PJ: fix prototypes for memory.