Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

64_bit logical is broken (was Re: Glob problem with memory)



in zsh.h we have
struct heap {
    struct heap *next;		/* next one                                  */
    size_t size;		/* size of heap                              */
    size_t used;		/* bytes used from the heap                  */
    struct heapstack *sp;	/* used by pushheap() to save the value used */
#ifdef PAD_64_BIT
    size_t dummy;		/* Make sure sizeof(heap) is a multiple of 8 */
#endif

with 
#ifndef LONG_IS_64_BIT
# define PAD_64_BIT 1
#endif

Now here

sizeof(long)== 4   so  PAD_64_BIT is defined as 1

but
sizeof(size_t) == 4  and sizeof(void*) == 4 too
so that the padding of struct heap is just wrong here.

What's the intent?

Helmut.

-- 
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
Institute of Technology, RWTH Aachen
D 52056 Aachen, Germany



Messages sorted by: Reverse Date, Date, Thread, Author