Import Debian changes 20180207-1
[hcoop/debian/mlton.git] / runtime / gc / pointer.c
CommitLineData
7f918cf1
CE
1/* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
3 * Copyright (C) 1997-2000 NEC Research Institute.
4 *
5 * MLton is released under a BSD-style license.
6 * See the file MLton-LICENSE for details.
7 */
8
9/* isPointer returns true if p looks like a pointer. */
10bool isPointer (pointer p) {
11 uintptr_t mask = ~((~((uintptr_t)0)) << GC_MODEL_MINALIGN_SHIFT);
12 return (0 == ((uintptr_t)p & mask));
13}