ubject: Re: bounds checker for Palm (and other ideas)
From: "Ben Combee" <[EMAIL PROTECTED]>


Ben Combee wrote:
> Doing a true BoundsChecker-like program that ran on any PalmOS device
would
> be rather difficult, mainly due to the lack of memory management
hardware
> which could remap memory.

I mean PC-based emulator/debugger enviroment with full bounds checking
capabilities.  Currently, when such thing does not exist,
and languages like Pascal are not avaliable for Palm,
there is no way to detect memory leaks, which limits Palm
capabilities and makes Palm as crushy as PC with Window 3.1,
if not worse.


>> I would also like to see the gcc compilier extension which allows
>> to store variables in databases transparently, i.e.
>>
>> void f() {
>>     databased unsigned long A[10000];
>>     // some code here
>> }
>>
>> Here, A is stored in a temporary database, and any references to it 
are
>> translated to reads/writes from the database.

> Yow!  This would be pretty evil to implement in the language

Not so evil.  The compilier should only translate A[...]=... to
the appropriate DmWrite calls, and add calls to DmNewRecord
and MemHandleLock at the beginning of the function, and
DmRemoveRecord at the end.

Pointers like (databased unsigned long) *  should be implemented
as a structure which contains record handle and offset.

The record should be permanently locked.
    
> it looks much more like something that should be implemented using a
> template, something like

>    DBItem < unsigned long[10000], 'APid' > A;

> with methods to lock and unlock the variable, and to handle writing
to 
> the variable using DmWrite.

You probably mean

DbArray < unsigned long, 10000, 'Apid' >

because the methods should know both the length and the basic type.


This would also be cute, but it can be done on C++ only.
I prefer C, since it produces compact and fast applications. 


--
Ben Combee
Veriprise Wireless <http://www.veriprise.com>









__________________________________________________
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to