|
|
#1 |
|
Junior Member
Join Date: Aug 2008
Posts: 2
|
System::Alloc question
Does anyone know why System::Alloc would not allocate memory? I'm trying to allocate a small amount of memory, but for some reason it won't in the script I wrote. I tried the System.nsi sample script and it worked fine! As far as I can tell, I'm not really doing anything different, however I keep getting 0 back as the result.
|
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
|
Possible reasons are: The system is out of memory or the remaining memory is too much fragmented (that is: there is no continuous block of free memory of the requested size). Both sounds very unlikely in your case, because you say that you are requesting only a "small amount" of memory. So I guess you are doing something wrong. But it's hard to say without seeing your code...
My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc My source of inspiration: http://youtu.be/lCwY4_0W1YI |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Aug 2008
Posts: 2
|
Heh, yeah, that would help if I could post it. It's for a project at work, so I can't do that.
As for running out of memory, yeah, that's not happening. I tried this on a machine with 13Gb free and I'm only trying to allocate 4 bytes, which is the size of the value I'm trying to put into the buffer. I do figure I'm doing something wrong, however I can't for the life of me figure it out. Every example I found revealed nothing of use. I mainly posted to see if anyone know of any sort of stack size limit/heap size limit/config setting/other that may have an affect on whether or not memory can be allocated. |
|
|
|
|
|
#4 |
|
Major Dude
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
|
Well, I tried this, just like the example:
code: And the result seems to work fine: code: Something else must go wrong in your installer... My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc My source of inspiration: http://youtu.be/lCwY4_0W1YI |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|