Article View: comp.unix.programmer
Article #3496How to use 3X malloc library on Solaris
From: Brian Modra
Date: Mon, 20 Nov 1995 00:00
Date: Mon, 20 Nov 1995 00:00
24 lines
1625 bytes
1625 bytes
Hi! Using the malloc(3X) library, I link with -lmalloc directly after all the object files, then add in all the other libraries my application uses including X, Motif. The program is linked by g++ -v, and nothing untoward is being done with the libraries. Running the program, malloc() is called successfully many times by my own code via new, but something else (probably Xt) calls malloc(), and fails. I get the message Error: Cannot perform malloc I know this message is not coming from my own code, because I have my own operator new() which I single-step over using gdb. Any clues? BTW, I am using 3X so that I can call mallinfo(3X) to find the remaining space on the heap. Is there any other -portable- way of finding out how much heap memory is left? Thanks in advance. -- Brian Modra (Software Engineer/Director AMRAD Pty/Ltd) bmodra@lands.sa.gov.au, bmodra@amrad.com.au Work: 08-2049060 Home: 08-3655075 (international: 61-8-3655075)
Technical Details
Message-ID:
<30AFB7EE.3BCF@lands.sa.gov.au>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10ba33,30fa7bdc83798570,start X-Google-Attributes: gid10ba33,public X-Google-Thread: fc89c,30fa7bdc83798570,start X-Google-Attributes: gidfc89c,public From: Brian Modra <bmodra@lands.sa.gov.au> Subject: How to use 3X malloc library on Solaris Date: 1995/11/20 Message-ID: <30AFB7EE.3BCF@lands.sa.gov.au> X-Deja-AN: 119660332 to: lisa-team@lands.sa.gov.au content-type: text/plain; charset=us-ascii organization: S.A. Dept. of Environment & Natural Resources mime-version: 1.0 newsgroups: comp.unix.programmer,gnu.g++.help x-mailer: Mozilla 2.0b1 (X11; I; HP-UX A.09.01 9000/715)