Definition natural_alignment := 8.
(* TODO: change this name to malloc_compatible_ptr and merge the definition of isptr, size_compatible, align_compatible into something like: size_align_compatible_ptr *)
Definition malloc_compatible (n: Z) (p: val) : Prop :=
match p with
| Vptr b ofs => (natural_alignment | Ptrofs.unsigned ofs) /\
Ptrofs.unsigned ofs + n < Ptrofs.modulus
| _ => False
end.

(* TODO: move these definitions and lemmas into a new file. *)
Lemma malloc_compatible_field_compatible:
forall (cs: compspecs) t p,
malloc_compatible (sizeof t) p ->
complete_legal_cosu_type t = true ->
natural_aligned natural_alignment t = true ->
field_compatible t nil p.