git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

Previous: Jakub NarebskiNext: Eric Hanchrow
Message 3 of 5 in “Dumb idea on git library for script languages”
  1. tsgatesApr 28, 2008
  2. Jakub NarebskiApr 28, 2008
  3. Johannes SchindelinApr 28, 2008
  4. Eric HanchrowApr 29, 2008
  5. Govind SalinasApr 29, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.