This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, i have simple question about freeing only part of allocated memory. Supouse that at begining of computatnion i reserwed ( malloc,relloc, etc) n bytes, after end of compuation i need only n/2 bytes so i want to free the rest of n/2 bytes. I could ofcourse use freeloc(beg.adress+n/2) after creating in memory apropriate structure usualy created by malloc to force freeloc to free only n/2 bytes, but maybe there is another way, for example using new and delate.
Lukas
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |