#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
int num = 500 * 1024 * 1024;
if (argc == 2)
{
sscanf(argv[1], "%d", &num);
num = num * 1024 * 1024;
}
char* arr = (char*) malloc(sizeof (char) * num);
for (long int i = 0; i<num; i++)
{
//printf("%d\n",i);
arr[i] = 'a';
}
printf("Allocated about %dMB\n", sizeof(char) * num / 1024 / 1024);
printf("Press any key to free memory and exit...\n");
getchar();
free (arr);
return 0;
}
Andrew wrote:Interesting stuff. Great to see people working on some unofficial solutions here.
Leftos wrote:Nope, haven't had the time to test it. I'll keep using MemAlloc anyway. Even if the patch actually fixed the crashes, there's nothing wrong with using MemAlloc either way. I'd hate to realize the patch didn't fix the crashes by having the game crash on me in the 3rd quarter.
If this weird crazy fix works, I'll keep using it. I've only played 2 games so far, but your reports seem encouraging. I'll keep using MemAlloc in the next few days (if I can get myself to stop playing Mass Effect 3 in my free time) and report on whether I've had a crash or not.
Pdub wrote:Setting any process to "realtime" is not recommended. If that process is using any processor time your entire cpu will freeze until it is done using the processor.
Users browsing this forum: No registered users and 0 guests