Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
void *ポインターが与えられた場合、この指定されたアドレスに割り当てられたブロックのサイズをどのように知ることができますか (以前mallocは Linux と Windows で ; を使用して割り当てられていました)。両方のシステムがこの種の情報を確実にどこかに保存することを願っています. つまり、malloc_sizeOSX/Darwin にはその代替が存在します。役立つ場合は gcc/mingw を使用します。
void *
malloc
malloc_size
Windows では、MS CRT を使用するものは_msizeを使用でき、Linux では malloc_usable_size を試すことができます...