lynx-dev
[Top][All Lists]
Advanced

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

Re: LYNX-DEV One way to get rid of memory leaks in Lynx


From: T.E.Dickey
Subject: Re: LYNX-DEV One way to get rid of memory leaks in Lynx
Date: Mon, 23 Mar 1998 05:28:32 -0500 (EST)

> >>>>> "a" == afn06760  <address@hidden> writes: 
>  
> a> It seems to me that, rather than use malloc and FREE so freely, 
> a> lynx developers might consider adding HTDOS.c to the Unix sources, 
> a> with the idea that the two static buffers in HTDOS.c could be 
> a> exploited by parts of the lynx code that need to use 1KB of memory, 
> a> then discard same.  The details of the HTDOS.c code, with the Dos 
> a> and Unix pathifying, need not be an obstacle, since it is trivial 
> a> to disable the pathifying, so that the buffer gets returned 
> a> untouched. 
>  
> What Lynx really needs is a HTSystemWWWName(), HTSystemFileName(), and 
> HTSystemFileNameAppend() that can be run on any generated file names 
> and will do the Right Thing to pathify them, and avoid all the inline 
> pathname mangling done now.  There would need to be at least Unix, 
> VMS, DOS/Win, and EMX definitions for the functions, and maybe a 
> CygWin version, too.  The idea is that you'd call one function which 
> would be defined at compile-time to contain the right pathifying code 
> for your platform. 
that is pretty much what I intend to do (the ifdef's are not necessary,
and produce work).  macros for a start, and consolidation by renaming
functions - there are a couple of cases where we'd keep the macros since
one or more platforms needs special parameters in some functions (I don't
remember the details, but did notice that VMS is in this category).

> Fixing memory leaks might be a side effect of this more important 
> change.  
perhaps - that's a different slant (in any case, I wouldn't try to reuse
global buffers, since it would break the code in various ways - there's
too many global variables as it is - a not uncommon problem in large
programs).

> | Jason F. McBrayer              address@hidden | 

-- 
Thomas E. Dickey
address@hidden
http://www.clark.net/pub/dickey

reply via email to

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