SysGetMem - klappt nicht
-
folgender code:
__fastcall TMDIChild::TMDIChild(TComponent *Owner) : TForm(Owner) { byte *platz; platz = (byte *) SysGetMem(1000000); //bitte gib mir Speicher! for (int i = 0; i < 1000000; i++) { platz[i] = 'c'; } SysFreeMem(platz); }
Problem: prog stürzt mit unzulässigem speicherzugriff ab. manchmal bei sysgetmem und manchmal erst beim reinschreiben.
wer kann mir helfen?