fix for prior rev

git-svn-id: svn://kolibrios.org@6980 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2017-09-17 02:19:14 +00:00
parent 9e8243ee10
commit 759ee15fdf
2 changed files with 4 additions and 4 deletions

View File

@ -41,10 +41,10 @@
{ {
debugln("Error: CopyFile->GetFileInfo"); debugln("Error: CopyFile->GetFileInfo");
} }
else if (GetFreeRAM() < CopyFile_atr.sizelo) else if (GetFreeRAM()-1024*1024 < CopyFile_atr.sizelo) //GetFreeRam-1Mb and convert to bytes
{ {
debugln("Error: CopyFile->File size is bigger than RAM avilable"); debugln("Error: CopyFile->File size is bigger than RAM avilable");
error = 30; error = 30;
} }
else { else {
cbuf = malloc(CopyFile_atr.sizelo); cbuf = malloc(CopyFile_atr.sizelo);

View File

@ -133,7 +133,7 @@ inline fastcall dword GetFreeRAM()
$mov eax, 18 $mov eax, 18
$mov ebx, 16 $mov ebx, 16
$int 0x40 $int 0x40
//return eax = ðàçìåð ñâîáîäíîé ïàìÿòè â êèëîáàéòàõ //return eax = free RAM in Kb
} }
inline fastcall dword LoadDriver(ECX) //ECX - èìÿ äðàéâåðà inline fastcall dword LoadDriver(ECX) //ECX - èìÿ äðàéâåðà