News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Alloc problem

Started by LithiumDex, January 27, 2007, 01:26:10 AM

Previous topic - Next topic

LithiumDex

When using Masm32's Alloc function, it seemed to have problems allocating large ammounts of data, the cut off seems to be somewhere between 1228800 Bytes, and 1920000 Bytes -- As the first worked and the second caused a crash (although Alloc did not return an error), when accessing the memory. I got around this problem by using crt_malloc and crt_free as defined in msvcrt.lib/inc -- Just thought I would mention this if this issue is not already known.

EDIT: crt_malloc and crt_free

hutch--

Use the "alloc" macro, it will allocate a gigabyte if you have that much memory available.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Ehtyar

Is there any rerason people seem to avoid using HeapAlloc/VirtualAlloc? I thought it was generally best to use these as opposed to a pre-backed solution.

Ehtyar.

hutch--

HeapAlloc/VirtualAlloc are fine, just check if they suit your memory allocation strategy.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Ehtyar

What other options are there? (aside from native/obsolete functions) Wouldn't the macros just call one of these?

Ehtyar.