• Stars
    star
    172
  • Rank 213,389 (Top 5 %)
  • Language
    C
  • Created over 10 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Debug heap useful for tracking down memory errors.

ig-debugheap - A debugging heap

This is a debug heap useful when trying to track down memory errors (especially on Windows, where there's no Valgrind.) It is written in C, and works on Mac, Linux and Windows.

This package provides the following features:

  • Array indexing errors (positive) trigger crashes, because allocations are aligned as closely as possible up to an inaccessible virtual memory page.

  • Using memory after freeing it triggers a crash most of the time.

  • Double frees are detected most of the time.

  • Unsynchronized multi-threaded access is detected.

To improve the chances of crashing on use-after-free or double frees, increase the size of the heap. Freed blocks are kept on an "observation list" for as long as possible to flush out these error classes, but it will eventually be reused.

This heap is terribly slow, and wastes tons of memory. You only want to use it to track down memory errors. One neat way of doing that is to provide a heap interface that can dynamically switch to this heap, maybe with a configuration option. You can then hunt for memory errors without recompiling.

License

Copyright (c) 2014, Insomniac Games All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

More Repositories

1

tundra

Tundra is a code build system that tries to be accurate and fast for incremental builds
C
428
star
2

ig-memtrace

Memory Tracing Software
C#
425
star
3

webby

A tiny webserver for game development
C
270
star
4

c-amplify

S-expression source translation and macro expansion utility
Common Lisp
80
star
5

deluxe68

A simple register allocator frontend for 68k assembly
C++
42
star
6

amiga-sdk

Bootstrap scripts for vbcc/vlink/vasm toolchain
C
27
star
7

ig-dedupe

OpenCL-based optical disc layout tool from Insomniac Games
C
26
star
8

trackloader

Amiga floppy trackloader bootblock + Demo startup.
Assembly
23
star
9

rlaunch

Amiga remote command launcher for cross development
C
20
star
10

sse-expr

Generate SSE expressions from prefix expressions
Common Lisp
20
star
11

m68kdecode

M68k instruction decoder written in Rust
Rust
14
star
12

alt

A Little Template Code Generator for C++
C
11
star
13

sse-docset

Create Dash docset from Intel Intrinsic Guide data
Perl
10
star
14

tundra-vsplugin

Visual Studio extension to improve interaction with Tundra 2.0 generated projects & solutions.
C#
10
star
15

blobct

Python library and C/Asm codegen to generate/work with binary blobs (load-in-place/mmap)
Python
6
star
16

intel-ref

Look up instructions in Intel's instruction reference PDFs and launches PDF viewer
Vim Script
6
star
17

win-path-control

Utility to add & remove paths from the system's PATH environment variable in the registry.
C++
5
star
18

vlink

Private copy of vlink with patches.
C
5
star
19

msvc-compiler-hook

Dynamic command line rewriting for Visual Studio 2008 to launch 3rd party tools, e.g. for cross compilation
C#
4
star
20

lemon-win32

Windows x64 build of the Lemon Parser generator - http://www.hwaci.com/sw/lemon/
C
4
star
21

c-amplify-swig

Experimental SWIG backend for c-amplify
C++
3
star
22

blobc3

Simple header/asm inc generator for mixed asm/c development
C#
3
star
23

ftgl

A repository of ftgl.
C++
2
star
24

vimcfg

This is where I keep my Vim configuration, with links to plugins as submodules where appropriate.
Shell
1
star