Главная страница | назад





Article #15644: How to reallocate blocks larger than 64K?

 Question and Answer Database

FAQ644C.txt   How to reallocate blocks larger than 64K?
Category   :C/C++ Language Issues
Platform    :DOS
Product    :   BC++4.5x   BC++5.x   TC++Dos3.0

Question:

I allocated some memory (using malloc) and now I want to 
reallocate it (with realloc). But when it grows bigger
than 64K, the reallocation runs but the after it strcat GPF's? 

What's wrong?

Answer:

For memory reallocations larger than 64K you can use farrealoc()
instead and farmalloc() previously. 

Also, there is a whole family of _fstr... functions to deal
with far pointers, like _fstrcat and _fstrlen. 

Use those functions instead.

7/2/98 10:32:32 AM
 

Last Modified: 01-SEP-99