Jason Evans d82a5e6a34 Implement the *allocx() API.
Implement the *allocx() API, which is a successor to the *allocm() API.
The *allocx() functions are slightly simpler to use because they have
fewer parameters, they directly return the results of primary interest,
and mallocx()/rallocx() avoid the strict aliasing pitfall that
allocm()/rallocx() share with posix_memalign().  The following code
violates strict aliasing rules:

    foo_t *foo;
    allocm((void **)&foo, NULL, 42, 0);

whereas the following is safe:

    foo_t *foo;
    void *p;
    allocm(&p, NULL, 42, 0);
    foo = (foo_t *)p;

mallocx() does not have this problem:

    foo_t *foo = (foo_t *)mallocx(42, 0);
2013-12-12 22:35:52 -08:00
..
2012-05-01 11:32:11 -07:00
2012-03-13 16:31:41 -07:00
2013-12-08 20:52:21 -08:00
2013-12-08 22:28:27 -08:00
2012-10-08 18:04:49 -07:00
2012-02-28 16:50:47 -08:00
2012-04-21 21:27:46 -07:00
2013-12-08 22:28:27 -08:00
2013-12-08 22:28:27 -08:00
2013-12-08 22:28:27 -08:00
2011-11-01 20:48:31 -07:00
2012-10-09 15:21:46 -07:00
2012-03-07 16:19:19 -08:00
2013-10-19 23:48:40 -07:00
2013-12-08 22:28:27 -08:00