Odd .....

Ben Duncan bns
Fri Jun 16 11:47:25 PDT 2006


Actually, It's a "way to beat the system" that lead me down this path.
My MVISAM has to somehow use DYNAMIC allocations for NODE stuff for
variable length keys in the key pair portion of a NODE structure.

SO, I cheat, I define my node as a 36 byte structure, last
4 bytes being a char Key_Pair [4] and "voile", malloc
a structure using 2048 (or whatever the NODE page size is defined).

This allows me to eventually, go back and tune dynamically, using
different node sizes (of course there has to be a "re-build" of the
database file to accomplish this). And all this cna be contained
in Super Block information.

Anyway, I was trying to figure out if there is a way to prevent
someone from going beyond my malloc'd NODE size when adding
key value items.

Don't want some nube hacking my C code and them not knowing WHAT I
am doing, or what THEY are doing either, now do we ?

Bill Campbell wrote:
> On Fri, Jun 16, 2006, Ben Duncan wrote:
> 

-- 
Ben Duncan   - Business Network Solutions, Inc. 336 Elton Road  Jackson MS, 39212
"Never attribute to malice, that which can be adequately explained by stupidity"
        - Hanlon's Razor




More information about the Linux-users mailing list