Memory Allocation

Jonathan I. Kamens jik at athena.mit.edu
Wed Feb 7 08:01:18 AEST 1990


In article <1990Feb6.185840.8866 at bluemtn.uucp>, cheryl at bluemtn.uucp
(Cheryl Lindsey) writes:
>  I am allocating pointers right and left and after a
> certain point the program will not allow me to allocate any more.
> ...
> The environment I am using is SCO UNIX System V/386 release 3.2.0 
> on an IBM PS/2 Model 70 386.  (Customer supplied not company choice.)
> ...
> After about 400K bytes allocated the program quits allocating space.
> Is there some way around this.

  I note with bemusement that you've went into great detail about the
machine you are using, but didn't bother to mention the somewhat
important details of how much memory your system has and how the
per-process limits are configured by default.  That would certainly help
to diagnose the problem.

  A few other questions I have -- (1) Are you ever *freeing* any of the
pointers that you are allocating?  (2) When you say that you are
allocating "pointers", do you mean that you are allocating space for
things like structures and then assigning the address of that allocated
space to a pointer?  (3) What are you using for allocation, malloc?  (4)
What error do you get when you can no longer allocate -- out of memory,
or something else?

Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik at Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8495			      Home: 617-782-0710



More information about the Comp.unix.questions mailing list