Re: Strange memory issues

new topic     » goto parent     » topic index » view thread      » older message » newer message
m_sabal said...

Has anyone else seen anything like this? I have a program written and running as a Windows service without any problems for about 6 years now on a physical Windows 2000 server. I've bound it with both Eu3.1 and Eu4.0.3 and both run fine. Running the exact same program on a virtual Windows 2003 server starts fine, but after anywhere from 3 to 12 hours, the program crashes with a type-check error. Examining the ex.err file shows that the crash is never in a consistent location. Yesterday's test had a crash in the Get() function called from a value() function as an example. It looked like the parameter to Get was uninitialized. It seems like the O/S is moving memory around and not putting it back correctly when requested. I've disabled DEP on this machine just to rule it out as a cause with no effect. The funny thing is, my Euphoria service is the only thing having problems on this virtual server. There are a number of other services that have been running well for a year with no problem. I don't get it.

Just guessing... Maybe a problem of memory locking... if the service allocate memory but use it without locking it, it may be paged out when it try to used it and that generate an exception. If so try these API call. On a VM memory as more chance to be paged out as resources are shared by many VM.

global function GlobalAlloc(atom flags, integer nBytes) 
    return c_func(iGlobalAlloc,{flags,nBytes}) 
end function 
 
global procedure GlobalFree(atom hmem) 
atom ok 
    ok = c_func(iGlobalFree,{hmem}) 
end procedure 
 
global function GlobalLock(atom hGlobalMem) 
    return c_func(iGlobalLock,{hGlobalMem}) 
end function 
 
global procedure GlobalUnlock(atom GlobalPtr) 
   c_proc(iGlobalUnlock,{GlobalPtr}) 
end procedure 
 
global function GlobalSize(atom hGlobal) 
  return c_func(iGlobalSize,{hGlobal}) 
end function 

for more information look at: memory

Jacques

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu