Could Not Allocate Binary Buffer Error
Keywords:
Question:
What might be the cause of this error message? I can't figure it out.
Answer:
Possibilities:
- Asking for more than your machine can provide.
- Allocated several and you are out of memory.
- Other processes have hogged the memory
and there is not enough left to fulfill the request.
- You've allocated a bunch and have not freed them. You use of the "WIL" extension makes it difficult
to guess exactly how you are running the scripts. But if you allocated one, then had a error that did NOT
exit the calling program (Like from Winbatch Studio), the buffer may still be open and count against your allowed
max of 10. Exiting and restarting the parent program would cure this. Note this is not a problem with
winbatch.exe
Continued:
Actually, I figured it out. I was searching a RAM buffer for some text, and instead of looking only for
the text that I wanted, I would move through my main buffer in small, successive sections, copying each
section to a second buffer and examining this second buffer (yes, there was a good reason for this). This
necessitated having to free, allocate, and copy into the second buffer many times, and eventually
WinBatch would give me that error message. When I decided to look only for the specific text, no more
allocation error (though my code became a little more cumbersome).
Tip:
You could just allocate ONE small search buffer (of sufficient size) and "empty" it with a
BinaryEODSet(bb,0) before each use.
Article ID: W12729
Filename: Could Not Allocate Binary Buffer Error.txt
File Created: 2001:04:24:10:24:28
Last Updated: 2001:04:24:10:24:28