Changes between Version 17 and Version 18 of ForeignFunctionInterface


Ignore:
Timestamp:
Oct 10, 2009 5:42:21 AM (6 years ago)
Author:
chak@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ForeignFunctionInterface

    v17 v18  
    6666'''TODO:''' Decide whether the current guarantees concerning finalizers are practical. 
    6767 
     68=== Alignment === 
     69 
     70Except for `mallocBytes` & `allocaBytes`, the original FFI addendum does not specify any constraints on alignment for allocated memory (by `mallocForeignPtrBytes` and others).  This is clearly an oversight.  The questions is how we want to express the fact that all routines that allocate memory specified in bytes must conform to a set of alignment constraints (this was proposed by Thomas !DuBuisson and John Meacham)  We may add the following statement concerning alignment at the beginning of Section 5 (which describes the library modules): 
     71 
     72  All storage allocated by functions that allocate based on a '''size in bytes''' must be sufficiently aligned for any of the basic foreign types (see Section 3.2) that fits into the newly allocated storage. All storage allocated by functions that allocated based on a '''specific type''' must be sufficiently aligned for that type.  Array allocation routines need to obey the same alignment constraints for each array element. 
     73 
     74'''TODO:''' Decide whether we want to add this text.  If not, we need to find an alternative way of expressing the required alignment constraints. 
     75 
    6876---- 
    6977