malloc
以下のように定義します。
void *malloc(size_t size);
http://pubs.opengroup.org/onlinepubs/009695399/functions/malloc.html
size_t
定義 (stddef.h):
size_t: Unsigned integer type of the result of the sizeof operator.
http://pubs.opengroup.org/onlinepubs/009604499/basedefs/stddef.h.html
ただし、このページによると、最大制限size_t
は 65535 です。 (セクション 他の整数型の制限):
size_t の制限: SIZE_MAX 65535 http://pubs.opengroup.org/onlinepubs/007904975/basedefs/stdint.h.html
C標準を尊重したい場合、65535バイトを超える割り当てができないということですか?