Dynamic memory allocation

I find out the Arduino 101 SRAM is 24k,
But when I dynamically allocate memory using new or malloc function like:
p = new char[6000] or p = malloc(6000) , both can work successfully
p = new char[7000] or p = malloc(7000) will fail
Why isn’t 24k ?

If I want an array of 10000 chars, how can i do? If dynamically allocate.

You might not have 10000 bytes available in only one place, they could be scattered in chunks. How much data is in your global variables? Do you use a lot of strings?

Using that much heap is not a good idea on the arduino. I would statically allocate it, so you can work around it.

It fully depends on the other code that you do not show.