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

List:       kde-core-devel
Subject:    Re: 0 or 0L for empty pointers?
From:       Michael Buesch <mb () bu3sch ! de>
Date:       2006-06-21 9:19:03
Message-ID: 200606211119.04066.mb () bu3sch ! de
[Download RAW message or body]

On Wednesday 21 June 2006 11:07, Brad Hards wrote:
> On Wednesday 21 June 2006 07:15 am, Michael Buesch wrote:
> > sizeof(long)==sizeof(void*) is an assumption in the linux kernel, at least.
> > So it is true for all archs which are supported by linux.
> I'm not sure you can safely assume that userspace and kernel space are the 
> same. I vaguely remember that sparc or mips has 64 bit kernelspace and 32 bit 
> userspace.

Sure. But the assumption is still valid.
The assumption in linux is exactly as follows:

sizeof(kernel long) == sizeof(kernel void *)
sizeof(user long) == sizeof(user void *)
sizeof(kernel long) maybe!= sizeof(user void *)

PPC64 generally has a 64bit kernel and 32bit userspace, because
32bit ppc code is faster.
I think sparc is similiar, but I don't know of the reasons.
Mips, well. I never saw a mips64 machine. Do they exist?

-- 
Greetings Michael.
[prev in list] [next in list] [prev in thread] [next in thread] 

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