0
我遞歸調用的函數,這是分配2048字節被分配在每個call.At啓動應用程序運行時按規定但後來卻是越來越給予墜毀「沒有足夠的存儲可用於處理此命令」的錯誤。內存分配器返回壞的內存指針,爲此應用程序正在崩潰。任何人都可以幫助我解決這個問題。沒有足夠的存儲是可用來處理此命令
char* parser(char *data){
char *string,*ptr,*result;
int len;
len=strlen(data);
ptr=strstr(data,"search");
if(ptr){
buf = (char *)GlobalAlloc(GPTR,sizeof(char)*len+1);
strncpy(buf,data,ptr-data);
buf[ptr-data]='\0';
result=parser(buf);
GlobalFree(buf);
return result;
}
}
Buy more memory? – Nick 2012-04-17 09:29:07
可能有[系統錯誤。代碼:8.沒有足夠的存儲可用於處理此命令](http://stackoverflow.com/questions/507853/system-error-code-8-not-enough-storage-is-available-to-process-this -命令) – 2012-04-17 09:34:30