It sounds like you're running into the limitation of 16-bit addressing in the x86 architecture, which limits you to a maximum of 64 kilobytes of memory. In order to allocate more than 64KB of memory, you'll need to use techniques such as memory paging or segmentation.
In the case of segmentation, you can allocate multiple memory segments and use a segment register to point to the current segment being used. This allows you to access more than 64KB of memory, but requires more complex code to manage the segments and switch between them as needed.
Alternatively, you can use memory paging, which allows you to map different portions of memory into different sections of virtual memory. This allows you to access more than 64KB of memory in...