Re: Reading a string of unknown size
- From: "Santosh" <santoshsnayak@xxxxxxxxx>
- Date: 27 Nov 2006 03:26:58 -0800
Anyway, your allocation strategy is very inefficient. Your calling
realloc() once every iteration of the loop. This could result in
fragmentation of the C library's memory pool. Why not allocate in terms
of fixed sized or dynamically growing blocks, say 128 bytes or so to
start with?
Very True, I agree with you.
I just wanted to give "Tonio Cartonio" the idea of how to do it.
.
- Follow-Ups:
- Re: Reading a string of unknown size
- From: Richard Heathfield
- Re: Reading a string of unknown size
- References:
- Re: Reading a string of unknown size
- From: Santosh
- Re: Reading a string of unknown size
- From: santosh
- Re: Reading a string of unknown size
- Prev by Date: Re: Reading a string of unknown size
- Next by Date: empty parameterized macro
- Previous by thread: Re: Reading a string of unknown size
- Next by thread: Re: Reading a string of unknown size
- Index(es):
Relevant Pages
|
|