タグ

CとFFIに関するNnwwwのブックマーク (2)

  • 6 ways to manage allocated memory in Haskell

    In this article, I will explore different ways to track all the allocated pointers and free them reliably. The complete code can be downloaded as a git repo: git clone https://ro-che.info/files/2017-08-06-manage-allocated-memory-haskell.git The modules below use the hsc2hs preprocessor; it replaces things like #{peek ...}, #{poke ...}, and #{size ...} with Haskell code. Way 1: traverse the structu

    Nnwww
    Nnwww 2017/08/11
    ResourceTは高機能高コスト、allocaBytesを使うのが手堅く、複数使う時はContTでまとめられる
  • 第58回 Cの配列をHaskellで利用する


    HaskellHaskell12CHaskellCOSAPICCHaskellFFIHaskellCC 22HaskellFFICPtrC使Ptr使HaskellC Storable
    第58回 Cの配列をHaskellで利用する
  • 1