bah.interprocess
BlitzMax Forums/Brucey's Modules/bah.interprocess
| ||
Brucey, I need to ask you a pretty basic question: In your shared_memory.bmx example, what size do I need to set the memory object to in order be able to use a number greater than 255? |
| ||
Size is in bytes, so if you set it to 1, that's one byte of memory. 4 would be the size of an Int, for example. If you wanted to store 4 Ints, you could set it to 16... and so on. GetAddress() returns a Byte Ptr. You may want to cast that to an Int Ptr if you want use it like an array for Ints. So, Local mem:Int Ptr = Int Ptr(region.GetAddress()) mem[0] = 1234567 ' set an int (first 4 bytes of the memory block) There's also a TSharedBank which can be used like a normal TBank except that it uses shared memory. (I don't seem to have an example for that... for some reason) |
| ||
In your shared_memory.bmx example ...mmm?!?...excuse my ignorance, but where is this example (and I presume this Module)? I'm very interested in it! |
| ||
Thanks Brucey. I really should try and understand these bits and bytes, your input helps a lot. Funny you should mentioned TShared bank, I was looking for that. I presume I can find functions for it somewhere in there. I'll look. Degac, check out bah.interprocess via SVN. |
| ||
Degac, check out bah.interprocess via SVN. Ok, mystery resolved, thanks! |
| ||
BaH dot whooodgywhah???? Didn't even know you had made such a module - I've never seen it on any of your modules lists before. Awesomeness Brucey - pure awesomeness! :-) |
| ||
I've never seen it on any of your modules lists before Well, I don't always talk about in-development projects. You know how it is :-p It sits on top of the boost module, and seems to work very well on the three platforms. Although I've not thrashed it with a proper app yet. Things like this are very "niche", I think. More niche than some of my other modules... |
| ||
I don't know about "niche", definitely a major feature. |