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

Re: [PATCH 1/3] Added generic string handling code.

From
Alex Riesen <raa.lkml@gmail.com>
Date
May 20, 2007, 10:01 UTC
Message-ID
<20070520100155.GB3106@steel.home>
In-Reply-To
<1179627869.32181.1284.camel@hurina>
Timo Sirainen, Sun, May 20, 2007 04:24:29 +0200:
> So here's my try on starting with something simple. Unlike almost all
> other string handling libraries, it doesn't allocate the memory
> dynamically.
Sometimes you _need_ dinamic memory allocation.
> This makes it really easy to convert existing code to use it. I'm
> including some example changes in the other patches. Besides making
> the code safer, it can also make it faster, especially those
> strcat() replacements.

It is also bigger, heavier on stack and sometimes slower because of more function calls involved.

Aside from that, I like it. I wouldn't use it universally, but there were times when I wished it has been be done this way.

Previous: Timo SirainenNext: Timo Sirainen
Message 2 of 7 in “Added generic string handling code.”
  1. 1/3 Added generic string handling code.Timo Sirainen, May 20, 2007
  2. Alex RiesenMay 20, 2007
  3. Timo SirainenMay 20, 2007
  4. Petr BaudisMay 22, 2007
  5. Timo SirainenMay 23, 2007
  6. Petr BaudisMay 23, 2007
  7. Timo SirainenMay 23, 2007

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.