realloc question

realloc question

Post by Ross Vandegrif » Tue, 08 Sep 1998 04:00:00



Let's say I malloc a pointer, and fill it with data.  Then when it is
full, let's say that I realloc it to hold another byte, and so on, until
I'm out of data.  The man page was unclear as to the reliability of
using realloc; it seems that so long as enough unfragmented menory is
available, the data retains it's integrity.  However, the realloc man
page implies that if memory is too fragmented, it will move the pointer,
in memory.  So is the data still pointed to by the pointer (with the new
location), or is it back in the old spot?  Is there any way that this
can be guarenteed.

--
Ross Vandegrift | Eric J. Fenderson

Common sense is the collection of prejudices acquired by age eigh*.
                -- Albert Einstein

 
 
 

1. realloc question

Hi,

I am in need of a function similar to 'realloc(2).'  I was planning
to use the 'realloc(2)' function but I found that man page for
realloc says ...

    Note: The realloc protocol is provided for source code compata-
    bility with old System V applications  and  should  be avoided in
    new applications.

Question: Is there an equivalent function for realloc?  Or, should
I code my own realloc?

I am using IBM RS/6000.

Thanks for your attention.
__________
Sudarshan.

2. Limiting Background Processes

3. Realloc question

4. Mount Floppy On Access??

5. realloc question

6. apache, php, sql

7. Question on realloc().

8. How can I start the X font server?

9. realloc / mlock / segmentation fault questions.

10. realloc() fail in big memory array

11. memory usage realloc()

12. realloc?

13. realloc problems