In this case it does not matter how much physical memory you have (64 MB or 128 MB or more), you can only use 1MB, and this 1MB is segmented. You have to declare the pointers pointing to the memory buffer with the "far" keyword:
//Declaring the pointer pointing to the //memory buffer
unsigned char far*bufferptr;
//Allocating 64000 bytes:
bufferptr=(unsigned char far*)malloc(64000*sizeof(unsigned char));
This code allocates 64000 bytes in the far heap, which size is about 400-500 Kbyte, so if you want to allocate big memory, you have to use the "far" keyword. Without it, the program tries to allocate the memory in the data segment, which is 64Kbyte large.
I hope this could help you, but I suggest forgetting the DOS and Real mode,and start to develop in Windows Protected mode. Belive me, in this case you can allocate as much memory as you need, and you can use easily the malloc() function.