Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!uflorida!cs.fau.edu!mahesh From: mahesh@cs.fau.edu (Mahesh Neelakanta) Newsgroups: comp.sys.hp Subject: Malloc Internal structure Message-ID: <1990Nov13.051452.21908@cs.fau.edu> Date: 13 Nov 90 05:14:52 GMT Distribution: comp Organization: Florida Atlantic University, Boca Raton Lines: 29 Greetings again, I'm back with another question :-) I have X11R4 Compiled with gcc 1.37.1 and have it working nicely. The only problem is that sometimes when I compile X apps from expo or somewhere else, the executable exits saying realloc() could not find anymore memory. So, I kinda wrote a realloc() that just malloc'd the memory needed and copied the original contents over to the new memory. The problem is that I need to know the size of the original memory. From what I've read (in K&R and soem other books) malloc stores this info before the actual memory that we use starts, i.e: ------------------------------ | | ....... ------------------------------ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^ Memory info User memory (what malloc() returns a ptr to) Right? Well, what is the structure of the memory info block for hp-ux 7.0 (for s300's)? I do not have source access so I am asking the net. Please reply via E-Mail or posting(If you think others will benefit form this). BTW anyone else had problems with malloc under hp-ux? I've tried both versions of malloc (one in libc.a and the libmalloc.a) and both give me problems. Thanks again all you folks in net-space. Mahesh Neelakanta Internet: mahesh@cs.fau.edu Undergrad Student (CS) mahesh@acc.fau.edu (407) 367-3981 Bitnet: mahesh@fauvax Danger Past, God Forgotten. - Tamil Proverb