>>>>> "CH" == Christopher Hunt <[EMAIL PROTECTED]> writes:
CH> Can anybody tell me if DmResizeRecord always resizes i.e. if I pass it
CH> in a record size of n whereby the record is already of size n, is there
CH> a performance price to pay other than for the comparison?
Any PalmOS system calls are done with "trap" command.
#I mean, something like "int 21h" of MS-DOS, if you don't
# understand "trap".
This is bit more then simple function call, which is lot more then
simple comaprison.
Also, it checks for correctness of your handle, check if the chunk
is being locked or not, etc.
So, I beleave it's lot more then comparison.
If, like on gnu-malloc, where "realloc()" call will do some sort of
Garbage Collection, it might be worth doing realloc() even though
you know the size is n, but PalmOS DOES NOT do this. So there's no
reason even from GC point of view.
... But at the same time, I don't really know. Which is faster?
To get size of record with MemHandleSize() and compare it with
myself then do DmResizeRecord() if n is bigger, or do
DmResizeRecord() everytime?
------
Kenichi Okuyama@Tokyo Research Lab. IBM. Co. Japan.