[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nsbasic-palmapi
Subject:    Re: [nsbasic-palmAPI] Systrapsub function
From:       Douglas Handy <dhandy1 () bellsouth ! net>
Date:       2003-01-21 20:42:45
Message-ID: o6br2vk80p3q8rrfj1fh9fsrf5uh0ro9vs () 4ax ! com
[Download RAW message or body]

PTH,

>Can someone tell me where I can find more information about the 
>various systrap calls.  

The Palm OS SDK documentation, downloadable from their website.  You may have to
register (free) as a developer first.

>I am interested in what the "MemChunkFree" 
>and "MemInit" trap do and how would I use it.  

Both of those are "System Use Only Functions" and "undocumented" in the SDK.
However, by examining the C language header include files in the SDK you can
often glean information on "undocumented" APIs.

That said, usage of "system use only functions" is highly discouraged.  Part of
the reason for not documenting them is so that Palm remains free to change their
implementations as the OS matures.  Under OS 5, some "system use only functions"
no longer exist.  Some exist but cause a no-op so if an application calls them
it doesn't crash and burn (of course it may not do what you expect either, since
the API does nothing).  Some functions they are still "supporting" because they
are in wide-spread use, even if technically system use only.  An example of the
latter is the API to obtain the Hot Sync user name.  Lots of apps use it as part
of the registration scheme.

>If you are calling 
>systrap 405 which is "frmHelp", you will experience some form 
>of "memory leak" upon exiting the application.  I would think 
>either "MemChunkFree" or "MemInit" will solve the problem but I just 
>don't know how I would use it or code it.  

It should never be necessary to use a system use only function in order to get a
leak-free program.  FrmHelp() is entirely self-contained, and if it did not
cleanup its own allocations it would have been common knowledge (among C
programmers) and fixed by now in the OS.

Therefore it is more likely to be some iteraction with the NSB runtime, and that
can be hard to debug without the source to the runtime (which we don't have).

In order to use APIs like MemHandleFree() or MemPtrFree() -- the ones an
application should use instead of MemChunkFree() -- you need the handle or
pointer which is to be freed.  You're not going to have that available because
you did not allocate it yourself.

Doug





Thanks in advance.
>
>
>Community email addresses:
> Post message: nsbasic-palmAPI@yahoogroups.com 
> Subscribe:  nsbasic-palmAPI-subscribe@yahoogroups.com  
> Unsubscribe:  nsbasic-palmAPI-unsubscribe@yahoogroups.com 
> List owner:  nsbasic-palmAPI-owner@yahoogroups.com 
>
>
>Shortcut URL to this page:
> http://groups.yahoo.com/group/nsbasic-palmAPI
> 
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
>


Community email addresses:
 Post message: nsbasic-palmAPI@yahoogroups.com 
 Subscribe:  nsbasic-palmAPI-subscribe@yahoogroups.com  
 Unsubscribe:  nsbasic-palmAPI-unsubscribe@yahoogroups.com 
 List owner:  nsbasic-palmAPI-owner@yahoogroups.com 


Shortcut URL to this page:
 http://groups.yahoo.com/group/nsbasic-palmAPI
 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic