* Bug in thread-safe malloc ?
@ 1996-05-28 22:57 Bob Palermo
0 siblings, 0 replies; only message in thread
From: Bob Palermo @ 1996-05-28 22:57 UTC (permalink / raw)
To: tru64-unix-managers
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: multipart/mixed; boundary="--------------3F54FF6ABD", Size: 1453 bytes --]
This is a multi-part message in MIME format.
--------------3F54FF6ABD
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
--
Bob Palermo ( bob@printrak.com )
--------------3F54FF6ABD
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="malloc.post"
I am running OSF 3.2 Rev C and Rev D and have run into an into what
appears to be a bug in the thread-safe version of malloc.
Given the following program:
main()
{
unsigned char *buff;
buff = (unsigned char*) malloc( 4000*4502 );
printf( "sleeping ...\n" );
sleep( 20 );
}
If this program is built as follows:
cc -o blorf blorf.c
then when this program runs it will have a virtual size of about 18.5M
( I used 'ps -o user,vsize,command | grep blorf' to determine this.)
However, if this program is built as follows:
cc -o blorf blorf.c -threads
then when this program runs it will have a virtual size of about 34.5M
I've noticed that the size of the block of memory allocated affects the
behavior of the bug. For example, when the same program attempts to
allocate a block of memory that is 4000*4000 bytes in size the discrepency
between the 'threads' version and 'non-threads' version is only about 2.5M.
Has anyone else seen this ?
Is this a feature or a bug ?
If it is a bug is there an existing patch ?
Any help is appreciated.
Thanks.
--------------3F54FF6ABD--
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1996-05-28 22:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-05-28 22:57 Bug in thread-safe malloc ? Bob Palermo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox