This is a mirror of official site: http://jasper-net.blogspot.com/

Sharing memory across different running applications

| Tuesday, August 23, 2011
Introduction

Sharing memory is a powerful tool and it can now be done simply....
You have an application, will call it application "A.exe" and you would like it to pass data to your application "B.exe". How would you do this?

    You could share a file, but this will be slow and if the data is used a lot? put excessive demand on your hard drive.
    You could share data across a local network link, but this just adds more overhead for your PC.
    You could share some memory, but how?

For example application "A" is a complex user interface that logs users in, reads databases and adds user form controls for controlling attached hardware. Application "B" needs to run at the same time within the same PC on another thread/CPU core. It controls hardware in real time via LAN or USB, yet needs data that would require application ‘A’s" users database results.

Sharing memory in real time is the best way. However this is not as easy as it sounds......

Background

The memory on a PC is fully managed by the operating system in this case Microsoft Windows 7. The operating system has to balance all the different running applications over several CPU cores for all of the running "threads". The applications "A" thread will have no knowledge of applications "B" thread or its memory use. So how can we set aside some memory to share some data?

In the bad old days of programming you would have typed "Reserve Memory Address XXX" and in "Basic" would have typed keywords like PEEK or POKE to place the data in. However if all your applications did this, you soon would have run out of memory, which did happen!

Read more: Codeproject
QR: VB_NET_Memory_Mapping.aspx

Posted via email from Jasper-net

0 comments: