Opened 5 years ago

Closed 5 years ago

#9859 closed feature request (fixed)

Implement `calloc{,Bytes,Array,Array0}` allocators

Reported by: ifesdjeen Owned by:
Priority: normal Milestone: 7.10.1
Component: Core Libraries Version:
Keywords: ffi Cc: hvr, ekmett, core-libraries-committee@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D527
Wiki Page:

Description (last modified by hvr)

Add zero-initialising versions of malloc{,Bytes,Array,Array0}

  • Add calloc and callocBytes to Foreign.Marshal.Alloc.
  • Add callocArray and callocArray0 to Foreign.Marshal.Array.

Proposal Discussion: https://www.haskell.org/pipermail/libraries/2014-November/024421.html

Change History (3)

comment:1 Changed 5 years ago by hvr

Cc: core-libraries-committee@… added
Component: libraries/baseCore Libraries
Description: modified (diff)
Differential Rev(s): D527Phab:D527
Status: newpatch
Version: 7.8.3

comment:2 Changed 5 years ago by Austin Seipp <austin@…>

In 08610c1fdc7816c74faed40f8a7d3c4b4758709e/ghc:

Implement `calloc{,Bytes,Array,Array0}` allocators

Summary:
This adds zero-initialising versions of `malloc{,Bytes,Array,Array0}`

 * Add `calloc` and `callocBytes` to `Foreign.Marshal.Alloc`.
 * Add `callocArray` and `callocArray0` to `Foreign.Marshal.Array`.

Reviewers: ekmett, duncan, austin, hvr

Reviewed By: austin, hvr

Subscribers: ezyang, simonmar, ekmett, duncan, thomie, carter

Projects: #ghc

Differential Revision: https://phabricator.haskell.org/D527

GHC Trac Issues: #9859

comment:3 Changed 5 years ago by hvr

Resolution: fixed
Status: patchclosed

patch landed; let's close this for now

Note: See TracTickets for help on using tickets.