These forums are CLOSED. Please visit the new forums HERE
Script compilation/memory allocation determination |
|
EF Klaar
Registered User
![]() Join date: 11 Jun 2007
Posts: 330
|
09-08-2009 12:34
Is it possible for a script to determine whether it has been compiled for LSL or Mono? Would I be right in thinking that if llGetFreeMemory returns a value greater than 16K, you can be certain that it has not been compiled for LSL? Or, to put it another way, is there a way of determining how much memory the script has been allocated in the first place?
|
Viktoria Dovgal
…
![]() Join date: 29 Jul 2007
Posts: 3,593
|
09-08-2009 13:08
Don't use the free memory, there are some cases where a Mono script can end up with less free than the LSO equivalent (that's the real reason we got the larger space), and later on when we get to do allocations, it will be possible for them to be smaller in total than LSO scripts.
Void came up with a nice quick little test to tell what the runtime is, using a documented difference in the way LSO and Mono treat unicode: /54/77/328697/1.html#post2486489 CODE
|
EF Klaar
Registered User
![]() Join date: 11 Jun 2007
Posts: 330
|
09-08-2009 13:17
Neat
![]() |
Void Singer
Int vSelf = Sing(void);
![]() Join date: 24 Sep 2005
Posts: 6,973
|
09-09-2009 13:21
strife has another one I missed, but I forgot the function, but I know it's on the forum in the last month or so
_____________________
|
| . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - |