delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/21/09:58:29

Date: Mon, 21 Jul 1997 09:56:20 -0400 (EDT)
From: "Art S. Kagel" <kagel AT ns1 DOT bloomberg DOT com>
To: Isaac Waldron <waldroni AT lr DOT net>
Cc: djgpp AT delorie DOT com
Subject: Re: Allocation of memory.
In-Reply-To: <33D210A6.5EDF@lr.net>
Message-Id: <Pine.D-G.3.91.970721095329.17027F-100000@dg1>
Mime-Version: 1.0

On Sun, 20 Jul 1997, Isaac Waldron wrote:

> Please Help.
> 
> I am trying to dynamically allocate memory for a buffer.  I wrote a
> header file that loads and displays pcx files.  I need to use a buffer
> for the decompressed image.
> 
> I'm using code like this:
> 
> unsigned char *imagebuffer;
> imagebuffer = (unsigned char *)malloc(bufsize);
> if (imagebuffer == NULL)
> {
> 	`error_handler(NOT_ENOUGH_MEM);
> }
> 
> It always exits with a "Not enough memory" error.

The obvious questions we need th answers to to help are:

1) What is the value of bufsize?  Type?
2) How much physical RAM do you have on your machine?
3) How much free disk space on the drive designated for DPMI swap?
4) What is your DPMI host/server (CWSDPMI/WIN31/WIN95/WINNT/QDPMI/...)?  
5) How much swap (Virtual Memory) is your DPMI host configured for?

Art S. Kagel, kagel AT bloomberg DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019