Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

A couple of threads (this and this) mention that passing pointers to data between applications using IShell_PostEvent may crash in future versions of BREW (when BREW implements virtual memory).

But doesn't ISHELL_BrowseURL and ISHELL_BrowseFile do the same thing? If so, are there replacements for these functions? And when is BREW expected to support virtual memory?

-Roshan

It should be fine to use those APIs. There is no reason why BREW would need to pass the pointer to another app. It can simply make a copy of the string instead. (I think that's what it currently does, anyway.) As long as you stick the using the BREW APIs as they are intended to be used, you should be fine.
As far as time frame for memory protection, no announcements have been made.

It should be fine to use those APIs. There is no reason why BREW would need to pass the pointer to another app. It can simply make a copy of the string instead. (I think that's what it currently does, anyway.) As long as you stick the using the BREW APIs as they are intended to be used, you should be fine.
As far as time frame for memory protection, no announcements have been made.

Well, according to Qualcomm in next version of virtual memory scheme will be implemented.

Well, according to Qualcomm in next version of virtual memory scheme will be implemented.

Hmm, where did you here that? I'm certain there will be new versions (perhaps minor versions) without memory protection, before there is a release with memory protection.

Hmm, where did you here that? I'm certain there will be new versions (perhaps minor versions) without memory protection, before there is a release with memory protection.

In BREW 2005 conference from Qualcomm engineers (it will be available possibly in BREW 4.x)

In BREW 2005 conference from Qualcomm engineers (it will be available possibly in BREW 4.x)

Even in current versions you shouldn't just pass memory using PostEvent.
The issue, at least in 3.x that I am working with, is that each application has it's own heap. The result is that you can not directly hand off ownership of memory. When an app exits all of the memory it allocated will be nuked.
The safe method to pass data is to use SendEvent, and then on the reciever side copy the data into memory the reciever allocates. After this you can then use PostEvent to have asychronous handling. However this approach will probably be broken by future BREW memory manager changes.

Even in current versions you shouldn't just pass memory using PostEvent.
The issue, at least in 3.x that I am working with, is that each application has it's own heap. The result is that you can not directly hand off ownership of memory. When an app exits all of the memory it allocated will be nuked.
The safe method to pass data is to use SendEvent, and then on the reciever side copy the data into memory the reciever allocates. After this you can then use PostEvent to have asychronous handling. However this approach will probably be broken by future BREW memory manager changes.