I would like to know which method is recommended for programming in Windows C: using the malloc or Win32 HeapAlloc function (perhaps VirtualAlloc?).
I read the MSDN article Memory Management Functions and the MSDN articles regarding malloc and HeapAlloc, but they do not say what to use and in what situations.
Stick to malloc unless you have a good reason to use something else. It will be implemented under the primitives of OS memory allocation, but there is no real advantage in immersing yourself in this level.
API, , , , Windows, , .
, - , , , Windows API, VirtualAlloc.
VirtualAlloc , , .
, , malloc().
VirtualAlloc MEM_RESET, , . , , Windows , . , , , - , .
. , .
: malloc() ( , ANSI-C) .
, , HeapAlloc, HeapFree . : , ( library1.dll) (, program.exe). , HeapAlloc, HeapResize HeapFree, C (, malloc, free, resize).
: , malloc/free/resize. , (: , ..), , VirtualAlloc, VirtualFree.
Rob, ... WinAPI, C-run-time, .
HeapAlloc /. .
malloc , , CRT OS HeapAlloc.
VirtualAlloc , ( Heap *).
Source: https://habr.com/ru/post/1698811/More articles:How to fake validation error in MonoRail modular module? - validationhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1698807/how-does-svnserve-serve-up-multiple-repositories&usg=ALkJrhju2Qg6WWL5tISRGBtyYMjXgkqUhwWARNING. Duplicate resource in Delphi 7, Infopower 4000 - compilationSharePoint Permission Tracking - sharepointSimple site (Apache / PHP / MySQL + JavaScript) - javascriptclosing javascript and placing functions - performanceHow long have you cached resources on the client side? - cachingВнешняя производительность интерфейса: поиск некоторых лучших практик/советов - actionscriptHttpWebRequest over SSL? - c #Strange error creating Excel files using Spreadsheet_Excel_Writer - phpAll Articles