Bruce Evans schrieb:
> 
> On Thu, 22 Feb 2001, Daniel Rock wrote:
> 
> > You may have forgotten to also change KINFO_PROC_SIZE in src/sys/user.h
> 
> Yes, rev.1.31 of src/sys/sys/user.h leaves it as an exercise to change
> KINFO_PROC_SIZE.
I hate doing such exercises, since it will be followed by some nasty
other exercises: Clean up your conflicting cvs files...

> > WARNING: size of kinfo_proc (648) should be 644!!!
> 
> This is normal if you haven't done the exercise.  It is just a warning.
This seems to be a "non required" exercise, since even if you fail solving
it, your machine continues working...


> > BTW What is the purpose of KINFO_PROC_SIZE? Why not simply using sizeof()?
> 
> It is to inhibit changes in the size of the struct.  Such changes would
> break the interface.  The struct must have a certain fixed size (and
> layout) for binary compatibility.  sizeof() would give the current size,
> not necessarily the size that is required for compatibility.
But:
Since the introduction of KINFO_PROC_SIZE (rev. 1.27(?) of src/sys/sys/user.h)
there have been two modifications which still required to rebuild libkvm, ...

Maybe many people won't use the spare entries at the end of the structure
but put their additions somewhere besides some other related variables
for aesthetical purposes?

Which value does libkvm use? KINFO_PROC_SIZE or sizeof()? It seems it uses
sizeof() since ps/top/w still work besides the warning message.

-- 
Daniel

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to