bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: malloc in glibc 2.3.1


From: Eugeni Dodonov
Subject: Re: malloc in glibc 2.3.1
Date: Mon, 18 Nov 2002 09:49:47 -0200
User-agent: Mutt/1.4i

On Mon, Nov 18, 2002 at 12:13:19PM +0100, Wolfram Gloger wrote:
> > I downloaded the dmalloc package and linked my project with it. It worked
> > just fine, so I suspect that the problem is with the glibc's malloc
> > implementation.
> 
> Please try the environment setting MALLOC_CHECK_=1 and then valgrind
> on your program.

Just complementing the last message - even without MALLOC_CHECK_ enviroment,
the program runs just fine:

address@hidden:/opt/projects/npfs/cache$ ./test 
Cache: 0 (1)
---> Abrindo arquivo
---> Lendo 65535 bytes
---> Indo para posicao 0 do arquivo
---> Lendo 65535 bytes
---> Indo para posicao 0 do arquivo
---> Lendo 32767 bytes
---> Lendo 32767 bytes
---> Indo para posicao 0 do arquivo
---> Lendo 131070 bytes
Segmentation fault
address@hidden:/opt/projects/npfs/cache$ valgrind ./test 2>/dev/null 
Cache: 0 (1)
---> Abrindo arquivo
---> Lendo 65535 bytes
---> Indo para posicao 0 do arquivo
---> Lendo 65535 bytes
---> Indo para posicao 0 do arquivo
---> Lendo 32767 bytes
---> Lendo 32767 bytes
---> Indo para posicao 0 do arquivo
---> Lendo 131070 bytes
---> Indo para posicao 25 do arquivo
---> Lendo 131070 bytes
---> Indo para posicao 50 do arquivo
---> Lendo 131070 bytes

Cache hits: 282, cache misses: 100
---> Alterando algoritmo para LRU
---> Lendo 65535 bytes
---> Indo para posicao 0 do arquivo
---> Lendo 65535 bytes
---> Indo para posicao 0 do arquivo
---> Lendo 32767 bytes
---> Lendo 32767 bytes
---> Indo para posicao 0 do arquivo
---> Lendo 131070 bytes
---> Indo para posicao 25 do arquivo
---> Lendo 131070 bytes
---> Indo para posicao 50 do arquivo
---> Lendo 131070 bytes
Cache hits: 564, cache misses: 200


What could be the source of the first segmentation fault?

> 
> Regards,
> Wolfram.
> 

-- 
[]'s,
Eugeni Dodonov
"All things are possible, except skiing thru a revolving door."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]