Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

From Palm OS to Symbian OS: Making the Switch, Part 2 : Page 2

Thinking about switching from Palm OS to Symbian OS? The proliferation of smartphones has made it necessary to build many wireless applications from the operating system on up and Symbian OS seems to have this market cornered. Part 2 of this series delves deeper into the differences between developing for Palm OS and for Symbian OS. So if you do decide to switch, you'll know what to expect.


advertisement
Memory Usage
Both Symbian OS and Palm OS use execute-in-place for efficient memory usage. With execute-in-place, your code can run without being copied into main memory.

Symbian OS, however, provides a more stable memory environment for applications than Palm OS. In Symbian OS, the kernel runs within its own protected address space. Because of this, a programs memory leak or stack over-run can't overwrite the kernel's stack or heap which would cause a system crash. When programs need to dynamically exchange data, it's done by using the Symbian OS' internal client-server architecture, with its minimal resources, message-passing system.

In addition, every program process has its own protected address space. Thus, it's difficult, although not impossible, to write an application that will overwrite another's program's address space—again, causing an application crash.



Palm OS also restricts the amount of memory used by an application's stack and heap. This means you must keep an applications stack size small and not allocate large objects on the heap. The situation is quite different in Symbian OS.

While there is a 2GB RAM limit, for all practical purposes the sky is the limit for an application's heap size. Hardware, not the Symbian OS, limits the amount of available memory. In real world development, this makes writing applications that require dynamic memory allocation much easier. On a smartphone, of course, the most popular use will be allocating dynamic memory in the form of buffers for communications application.

Palm OS does not support virtual memory and has no per-process memory protection. This means badly written applications can overwrite other program's memory segments, also leading to crashes. With Symbian OS, the programming framework makes it much more difficult to make this kind of mistake.

A Symbian OS application that allocates dynamic memory on the heap but doesn't release it can lead to poor memory management especially with multiple open applications.

In short, Symbian makes it harder, but not impossible to leak memory

Code Reusability and Shared Libraries
To save memory and effort, Symbian OS is designed so that code can be reused as often as possible.

This is done in two ways. The first is by making low-level services available to applications via the layered components of the operating system. The second is by enabling the reuse of DLLs.

As you can see from Figure 3, a great deal of functionality is already available from the operating system so you don't need to reinvent even high level constructions like a WAP browser.

 
Figure 3: Symbian OS Functionality

Applications access this functionality via the appropriate API calls.

In Palm OS, on the other hand, you must build your own higher level functions or look to pre-existing third-party plug-ins.

In Symbian OS, you can also use system DLLs, normally located in permanent storage, to be executed in place thus saving main memory space. You must load DLLs stored in expanded memory storage into into main memory.

When Symbian OS loads a program, it also loads all the DLLs it calls. If the DLL is already in permanent storage or has already been loaded by another process, the process' threads share the resident copy rather than loading an additional copy. This cuts down the code loaded into main memory to a bare minimum.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date