Hoogle Search
Within LTS Haskell 24.51 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
malloc0 :: (HasCallStack, MonadIO m) => CSize -> m (Ptr ())gi-glib GI.GLib.Functions Allocates nBytes bytes of memory, initialized to 0's. If nBytes is 0 it returns Nothing. If the allocation fails (because the system is out of memory), the program is terminated.
malloc0N :: (HasCallStack, MonadIO m) => CSize -> CSize -> m (Ptr ())gi-glib GI.GLib.Functions This function is similar to malloc0, allocating (nBlocks * nBlockBytes) bytes, but care is taken to detect possible overflow during multiplication. If the allocation fails (because the system is out of memory), the program is terminated. Since: 2.24
mallocN :: (HasCallStack, MonadIO m) => CSize -> CSize -> m (Ptr ())gi-glib GI.GLib.Functions This function is similar to malloc, allocating (nBlocks * nBlockBytes) bytes, but care is taken to detect possible overflow during multiplication. If the allocation fails (because the system is out of memory), the program is terminated. Since: 2.24
memIsSystemMalloc :: (HasCallStack, MonadIO m) => m Boolgi-glib GI.GLib.Functions Deprecated: (Since version 2.46)GLib always uses the system malloc, so this function alwaysreturns True.
rcBoxAlloc :: (HasCallStack, MonadIO m) => CSize -> m (Ptr ())gi-glib GI.GLib.Functions Allocates blockSize bytes of memory, and adds reference counting semantics to it. The data will be freed when its reference count drops to zero. The allocated data is guaranteed to be suitably aligned for any built-in type. Since: 2.58
rcBoxAlloc0 :: (HasCallStack, MonadIO m) => CSize -> m (Ptr ())gi-glib GI.GLib.Functions Allocates blockSize bytes of memory, and adds reference counting semantics to it. The contents of the returned data is set to zero. The data will be freed when its reference count drops to zero. The allocated data is guaranteed to be suitably aligned for any built-in type. Since: 2.58
realloc :: (HasCallStack, MonadIO m) => Ptr () -> CSize -> m (Ptr ())gi-glib GI.GLib.Functions Reallocates the memory pointed to by mem, so that it now has space for nBytes bytes of memory. It returns the new address of the memory, which may have been moved. mem may be Nothing, in which case it's considered to have zero-length. nBytes may be 0, in which case Nothing will be returned and mem will be freed unless it is Nothing. If the allocation fails (because the system is out of memory), the program is terminated.
reallocN :: (HasCallStack, MonadIO m) => Ptr () -> CSize -> CSize -> m (Ptr ())gi-glib GI.GLib.Functions This function is similar to realloc, allocating (nBlocks * nBlockBytes) bytes, but care is taken to detect possible overflow during multiplication. If the allocation fails (because the system is out of memory), the program is terminated. Since: 2.24
sliceAlloc :: (HasCallStack, MonadIO m) => CSize -> m (Ptr ())gi-glib GI.GLib.Functions Allocates a block of memory from the libc allocator. The block address handed out can be expected to be aligned to at least 1 * sizeof (void*). Since GLib 2.76 this always uses the system malloc() implementation internally. Since: 2.10
sliceAlloc0 :: (HasCallStack, MonadIO m) => CSize -> m (Ptr ())gi-glib GI.GLib.Functions Allocates a block of memory via sliceAlloc and initializes the returned memory to 0. Since GLib 2.76 this always uses the system malloc() implementation internally. Since: 2.10