texmacs-dev
[Top][All Lists]
Advanced

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

Re: [Texmacs-dev] Scrolling speed


From: Joris van der Hoeven
Subject: Re: [Texmacs-dev] Scrolling speed
Date: Sat, 29 May 2004 13:28:20 +0200 (CEST)

On Wed, 26 May 2004, Dan Martens wrote:
> >Any explanation for this phenomenon? Does malloc give me blocks which
> >do not behave well from the cache point of view? Should I allocate
> >larger consecutive blocks of memory? I currently allocate blocks of
> >64Kb for small objects. Should I use larger blocks instead?
> >Should I also use larger blocks for big mallocs?
>
> If you are constantly allocating and deallocating blocks, your memory
> is going to get fragmented.  The more fragmented it gets, the more time
> malloc's search algorithm for best fit is going to take.  If your always
> deallocating and allocating the same size of blocks, this should not be
> a problem unless another program is allocating chunks of the recently
> deallocated blocks in which case it will then be too small to reclaim
> and malloc will have to keep searching.

Beware, that we have our own memory allocation routines
(we use linked lists for small deallocated objects (<= 256 bytes) and
the standard malloc for large objects; 90% of our objects are small).

By the way, it might be a good idea to test whether the phenomenon
also occurs for our Windows port. If not, then it is more likely to
be a problem with X.





reply via email to

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