guile-devel
[Top][All Lists]
Advanced

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

SCM_STATIC_ALIGNED_ARRAY


From: Ludovic Courtès
Subject: SCM_STATIC_ALIGNED_ARRAY
Date: Mon, 01 Mar 2010 17:33:27 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Hello Andy!

"Andy Wingo" <address@hidden> writes:

> commit cee1d22c3c10b1892c82a5758ef69cd6fc9aba31
> Author: Andy Wingo <address@hidden>
> Date:   Mon Feb 22 23:00:19 2010 +0100
>
>    actually capture partial continuations

[...]

> +#ifdef SCM_ALIGNED
> +#define SCM_DECLARE_STATIC_ALIGNED_ARRAY(type, sym)\
> +static const type sym[]
> +#define SCM_STATIC_ALIGNED_ARRAY(alignment, type, sym)\
> +static SCM_ALIGNED (alignment) const type sym[]
> +#else
> +#define SCM_DECLARE_STATIC_ALIGNED_ARRAY(type, sym)\
> +static type *sym
> +#define SCM_STATIC_ALIGNED_ARRAY(alignment, type, sym)                  \
> +SCM_SNARF_INIT(sym = scm_malloc (sizeof(sym##__unaligned) + alignment - 1); \

‘scm_gc_malloc_pointerless ()’ could be used here.  It always returns
8-byte aligned areas [0], which should allow some of the alignment
twiddling to be removed.  What do you think?

Also, the indentation, spacing, etc., are not GCS-conforming.

Thanks,
Ludo’.

[0] http://www.hpl.hp.com/hosted/linux/mail-archives/gc/2006-May/001280.html




reply via email to

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