Example #1
0
void* cpputest_calloc_location(size_t num, size_t size, const char* file, int line)
{
    void* mem = cpputest_malloc_location(num * size, file, line);
    if (mem)
        PlatformSpecificMemset(mem, 0, num*size);
    return mem;
}
TEST(BasicBehavior, bothMallocAndFreeAreOverloaded)
{
	void* memory = cpputest_malloc_location(sizeof(char), "file", 10);
	free(memory);

	memory = malloc(sizeof(unsigned char));
	cpputest_free_location(memory, "file", 10);
}
void* cpputest_malloc(size_t size)
{
	return cpputest_malloc_location(size, "<unknown>", 0);
}
Example #4
0
	void* cpputest_calloc_location(size_t num, size_t size,const char* file, int line)
	{
	   return cpputest_malloc_location(num*size, file, line);
	}