sone general warnings to not arbitrarily raise the memory size option
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3231
This commit is contained in:
parent
b5c3adc871
commit
b2ae2d8c07
2 changed files with 13 additions and 3 deletions
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dosbox.cpp,v 1.137 2008-05-21 21:29:16 c2woody Exp $ */
|
||||
/* $Id: dosbox.cpp,v 1.138 2008-10-27 11:02:41 c2woody Exp $ */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -68,6 +68,7 @@ void FPU_Init(Section*);
|
|||
#endif
|
||||
|
||||
void DMA_Init(Section*);
|
||||
|
||||
void MIXER_Init(Section*);
|
||||
void MIDI_Init(Section*);
|
||||
void HARDWARE_Init(Section*);
|
||||
|
@ -348,7 +349,11 @@ void DOSBOX_Init(void) {
|
|||
secprop->AddInitFunction(&HARDWARE_Init);//done
|
||||
Pint = secprop->Add_int("memsize", Property::Changeable::WhenIdle,16);
|
||||
Pint->SetMinMax(1,63);
|
||||
Pint->Set_help("Amount of memory DOSBox has in megabytes.");
|
||||
Pint->Set_help(
|
||||
"Amount of memory DOSBox has in megabytes.\n"
|
||||
" This value is best left at its default to avoid problems with some games,\n"
|
||||
" though few games might require a higher value.\n"
|
||||
" There is generally no speed advantage when raising this value.");
|
||||
secprop->AddInitFunction(&CALLBACK_Init);
|
||||
secprop->AddInitFunction(&PIC_Init);//done
|
||||
secprop->AddInitFunction(&PROGRAMS_Init);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: memory.cpp,v 1.54 2008-03-09 20:32:23 c2woody Exp $ */
|
||||
/* $Id: memory.cpp,v 1.55 2008-10-27 11:02:41 c2woody Exp $ */
|
||||
|
||||
#include "dosbox.h"
|
||||
#include "mem.h"
|
||||
|
@ -28,6 +28,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#define PAGES_IN_BLOCK ((1024*1024)/MEM_PAGE_SIZE)
|
||||
#define SAFE_MEMORY 32
|
||||
#define MAX_MEMORY 64
|
||||
#define MAX_PAGE_ENTRIES (MAX_MEMORY*1024*1024/4096)
|
||||
#define LFB_PAGES 512
|
||||
|
@ -553,6 +554,10 @@ public:
|
|||
LOG_MSG("Maximum memory size is %d MB",MAX_MEMORY - 1);
|
||||
memsize = MAX_MEMORY-1;
|
||||
}
|
||||
if (memsize > SAFE_MEMORY-1) {
|
||||
LOG_MSG("Memory sizes above %d MB are NOT recommended.",SAFE_MEMORY - 1);
|
||||
LOG_MSG("Stick with the default values unless you are absolutely certain.");
|
||||
}
|
||||
MemBase = new Bit8u[memsize*1024*1024];
|
||||
if (!MemBase) E_Exit("Can't allocate main memory of %d MB",memsize);
|
||||
/* Clear the memory, as new doesn't always give zeroed memory
|
||||
|
|
Loading…
Add table
Reference in a new issue