[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scm_bits_t / scm_ubits_t

From: Marius Vollmer
Subject: Re: scm_bits_t / scm_ubits_t
Date: 01 Jun 2001 00:44:16 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.102

Dirk Herrmann <address@hidden> writes:

> On 31 May 2001, Marius Vollmer wrote:
> > I think we should have
> > 
> >     typedef uintptr_t scm_t_bits;
> >     typedef intptr_t scm_t_length;
> >     typedef uintptr_t scm_t_ulength;
> Agreed with respect to scm_t_bits.  But, why aren't lengths just
> size_t variables?  Maybe I am wrong here, but I thought that size_t
> was a type that resembles the amount of available memory.

Hmm, could be.  But if that is the case, why isn't size_t good enough
for holding all pointers?  Why did they specify intptr_t?  The
information I have (from the glibc docs) is that size_t can hold the
size of all objects that can be allocated by malloc (or some other
means).  In a segmented architecture, I could imagine that there is
more memory available in toto than the maximum size of any single

Since we already find intptr_t or define it ourselves, we can also use
it for the length types.

But I think you are arguing that introdcuing the special aliases
scm_t_length and scm_t_ulength is not necessary, right?  If we can
indeed let them be equal to ssize_t and size_t, then we should avoid
them, I agree.  But can we?  Jacques?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]