-void * allocate_new(int type);
-struct ArrayObject * allocate_newarray(int type, int length);
-struct ___String___ * NewString(const char *str,int length);
-struct ___TagDescriptor___ * allocate_tag(int index);
+__attribute__((malloc)) void * allocate_new(void *, int type);
+__attribute__((malloc)) struct ArrayObject * allocate_newarray(void *, int type, int length);
+#endif
+__attribute__((malloc)) StringPtr NewString(void *, const char *str,int length);
+__attribute__((malloc)) StringPtr NewStringShort(void *, const short *str,int length);
+__attribute__((malloc)) struct ___TagDescriptor___ * allocate_tag(void *ptr, int index);
+#elif defined(MULTICORE_GC)||defined(PMC_GC)
+__attribute__((malloc)) void * allocate_new(void *, int type);
+__attribute__((malloc)) struct ArrayObject * allocate_newarray(void *, int type, int length);
+__attribute__((malloc)) StringPtr NewString(void *, const char *str,int length);
+__attribute__((malloc)) StringPtr NewStringShort(void *, const short *str,int length);
+__attribute__((malloc)) struct ___TagDescriptor___ * allocate_tag(void *ptr, int index);
+#else
+__attribute__((malloc)) void * allocate_new(int type);
+__attribute__((malloc)) struct ArrayObject * allocate_newarray(int type, int length);
+__attribute__((malloc)) StringPtr NewString(const char *str,int length);
+__attribute__((malloc)) StringPtr NewStringShort(const short *str,int length);
+__attribute__((malloc)) struct ___TagDescriptor___ * allocate_tag(int index);