2{-# LANGUAGE BangPatterns #-}
3{-# LANGUAGE ExistentialQuantification #-}
4{-# LANGUAGE MagicHash #-}
5{-# LANGUAGE RecordWildCards #-}
6{-# LANGUAGE ScopedTypeVariables #-}
7{-# LANGUAGE TypeFamilies #-}
8{-# LANGUAGE UnboxedTuples #-}
9{-# LANGUAGE FlexibleContexts #-}
14-- Module : Streamly.Memory.Malloc
15-- Copyright : (c) 2019 Composewell Technologies
18-- Maintainer : harendra.kumar@gmail.com
19-- Stability : experimental
22module Streamly.Memory.Malloc
24 mallocForeignPtrAlignedBytes
31import Foreign.ForeignPtr (newForeignPtr)
32import Foreign.Marshal.Alloc (mallocBytes, finalizerFree)
35import qualified GHC.ForeignPtr as GHC
37{-# INLINE mallocForeignPtrAlignedBytes #-}
38mallocForeignPtrAlignedBytes :: Int -> Int -> IO (GHC.ForeignPtr a)
40mallocForeignPtrAlignedBytes size alignment = do
41 GHC.mallocPlainForeignPtrAlignedBytes size alignment
43mallocForeignPtrAlignedBytes size _alignment = do
45 newForeignPtr finalizerFree p
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list