MCPcopy Create free account
hub / github.com/coreboot/coreboot / xmemalign_work

Function xmemalign_work

src/commonlib/bsd/include/commonlib/bsd/stdlib.h:43–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41#define xzalloc(size) xzalloc_work((size), __FILE__, __func__, __LINE__)
42
43static inline void *xmemalign_work(size_t align, size_t size, const char *file,
44 const char *func, int line)
45{
46 void *ret = memalign(align, size);
47 if (!ret && size) {
48 printk(BIOS_ERR, "%s:%d %s(): "
49 "Failed to memalign %zu bytes with %zu alignment.\n",
50 file, line, func, size, align);
51 abort();
52 }
53 return ret;
54}
55#define xmemalign(align, size) xmemalign_work((align), (size), __FILE__, __func__, __LINE__)
56
57#endif /* __COMMONLIB_STDLIB_H__ */

Callers

nothing calls this directly

Calls 3

memalignFunction · 0.50
printkFunction · 0.50
abortFunction · 0.50

Tested by

no test coverage detected