Frequency of 3.8 Malloc Options Check

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Frequency of 3.8 Malloc Options Check

dfeustel
I now have 3.8 installed. Very Nice, especially Firefox.
CDROM Artwork is also nicely done.
My question is re Malloc. When and how often does malloc
check the flags in MALLOC_OPTIONS. Once at system init,
on every malloc call, or other? Can I set the options,
run a program, and see if the new options affect the way
the program runs?

Thanks,
Dave Feustel

Reply | Threaded
Open this post in threaded view
|

Re: Frequency of 3.8 Malloc Options Check

Otto Moerbeek
On Tue, 29 Nov 2005, Dave Feustel wrote:

> I now have 3.8 installed. Very Nice, especially Firefox.
> CDROM Artwork is also nicely done.
> My question is re Malloc. When and how often does malloc
> check the flags in MALLOC_OPTIONS. Once at system init,
> on every malloc call, or other? Can I set the options,
> run a program, and see if the new options affect the way
> the program runs?

It is be checked at process startup.

        -Otto

Reply | Threaded
Open this post in threaded view
|

Re: Frequency of 3.8 Malloc Options Check

Ted Unangst-2
In reply to this post by dfeustel
On 11/29/05, Dave Feustel <[hidden email]> wrote:
> I now have 3.8 installed. Very Nice, especially Firefox.
> CDROM Artwork is also nicely done.
> My question is re Malloc. When and how often does malloc
> check the flags in MALLOC_OPTIONS. Once at system init,
> on every malloc call, or other? Can I set the options,
> run a program, and see if the new options affect the way
> the program runs?

first call to malloc a program makes.

Reply | Threaded
Open this post in threaded view
|

Re: Frequency of 3.8 Malloc Options Check

Todd C. Miller
In reply to this post by dfeustel
Note that you can also set the malloc options from within a program
you are developing.  I've found this to be quite useful for adding
a "belt and suspenders" mode during developement (the use after
free checks in particular).

 - todd

Reply | Threaded
Open this post in threaded view
|

Re: Frequency of 3.8 Malloc Options Check

dfeustel
On Tuesday 29 November 2005 19:19, Todd C. Miller wrote:
> Note that you can also set the malloc options from within a program
> you are developing.  I've found this to be quite useful for adding
> a "belt and suspenders" mode during developement (the use after
> free checks in particular).
>
>  - todd

Interesting! I hadn't thought of that possibility. I just tried defining
MALLOC_OPTIONS as an environment symbol. I put in all the letters
mentioned in 'man malloc' but malloc repeatedly reports the presence
of an unknown letter.

Reply | Threaded
Open this post in threaded view
|

Re: Frequency of 3.8 Malloc Options Check

Otto Moerbeek
On Tue, 29 Nov 2005, Dave Feustel wrote:

> On Tuesday 29 November 2005 19:19, Todd C. Miller wrote:
> > Note that you can also set the malloc options from within a program
> > you are developing.  I've found this to be quite useful for adding
> > a "belt and suspenders" mode during developement (the use after
> > free checks in particular).
> >
> >  - todd
>
> Interesting! I hadn't thought of that possibility. I just tried defining
> MALLOC_OPTIONS as an environment symbol. I put in all the letters
> mentioned in 'man malloc' but malloc repeatedly reports the presence
> of an unknown letter.

Which letters were you using?

        -Otto

Reply | Threaded
Open this post in threaded view
|

Re: Frequency of 3.8 Malloc Options Check

Otto Moerbeek
In reply to this post by dfeustel
On Tue, 29 Nov 2005, Dave Feustel wrote:

> On Tuesday 29 November 2005 19:19, Todd C. Miller wrote:
> > Note that you can also set the malloc options from within a program
> > you are developing.  I've found this to be quite useful for adding
> > a "belt and suspenders" mode during developement (the use after
> > free checks in particular).
> >
> >  - todd
>
> Interesting! I hadn't thought of that possibility. I just tried defining
> MALLOC_OPTIONS as an environment symbol. I put in all the letters
> mentioned in 'man malloc' but malloc repeatedly reports the presence
> of an unknown letter.

it's likely D, which is not available by default, as documented.

        -Otto

Reply | Threaded
Open this post in threaded view
|

Re: Frequency of 3.8 Malloc Options Check

dfeustel
On Wednesday 30 November 2005 02:17, Otto Moerbeek wrote:

> On Tue, 29 Nov 2005, Dave Feustel wrote:
> > On Tuesday 29 November 2005 19:19, Todd C. Miller wrote:
> > > Note that you can also set the malloc options from within a program
> > > you are developing.  I've found this to be quite useful for adding
> > > a "belt and suspenders" mode during developement (the use after
> > > free checks in particular).
> > >
> > >  - todd
> >
> > Interesting! I hadn't thought of that possibility. I just tried defining
> > MALLOC_OPTIONS as an environment symbol. I put in all the letters
> > mentioned in 'man malloc' but malloc repeatedly reports the presence
> > of an unknown letter.
>
> it's likely D, which is not available by default, as documented.

D was in fact the problem. I removed that letter  from the string
and the message went away.
> -Otto