WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Binary Functions

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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:
  1. Asking for more than your machine can provide.

  2. Allocated several and you are out of memory.

  3. Other processes have hogged the memory and there is not enough left to fulfill the request.

  4. 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