don't allow dos it's memory to be freed
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1605
This commit is contained in:
parent
595d9eaf3b
commit
5c9b46a52c
1 changed files with 5 additions and 0 deletions
|
@ -165,6 +165,11 @@ bool DOS_ResizeMemory(Bit16u segment,Bit16u * blocks) {
|
|||
|
||||
bool DOS_FreeMemory(Bit16u segment) {
|
||||
//TODO Check if allowed to free this segment
|
||||
if ((segment-1) < MEM_START){
|
||||
LOG(LOG_DOSMISC,LOG_ERROR)("Program tried to free %X ---ERROR",segment);
|
||||
return false;
|
||||
}
|
||||
|
||||
DOS_MCB mcb(segment-1);
|
||||
mcb.SetPSPSeg(MCB_FREE);
|
||||
DOS_CompressMemory();
|
||||
|
|
Loading…
Add table
Reference in a new issue