Re: Dumb idea on git library for script languages
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Apr 28, 2008, 10:28 UTC
- Message-ID
- <alpine.DEB.1.00.0804281125330.5399@eeepc-johanness>
- In-Reply-To
- <1209366216.17090.4.camel@prosumer>
Hi,
On Mon, 28 Apr 2008, tsgates wrote:
Show 17 quoted lines
> malloc_hook( size ) {
> void * rtn = malloc( size )
> if ( rtn ) {
> add_to_mem_record( thread_id, rtn )
> }
> }
>
> free_hook( ptr ) {
> if ( free( ptr ) ) {
> del_mem_record( thread_id, ptr )
> }
> }
>
> clean_mem() {
> for_each ( mem_records )
> free( ptr )
> }This is not enough. We have quite some static variables which point directly or indirectly to these allocated regions.
I think you'd need to implement some resetter functions if you were to libify libgit.a. The easier way would definitely be to go with libgit-thin, as Jakub suggested.
Ciao, Dscho