On Thu, Jan 31, 2019 at 10:58:27AM +0100, Sebastian Huber wrote: > On 31/01/2019 10:56, Jakub Jelinek wrote: > > On Thu, Jan 31, 2019 at 10:37:29AM +0100, Sebastian Huber wrote: > > > My problem is that our real-time operating system (RTEMS) is somewhere in > > > between a full blown Linux and the offload hardware. I would like to get > > > rid > > > of stuff which depends on the Newlib struct _reent since this pulls in a > > > lot > > > of dependencies. The heavy weight functions are just used for the > > > initialization (env.c) and error reporting. Containing the heap allocation > > > functions helps to control the memory used by OpenMP computations. > > Heap allocations are everywhere in libgomp, not just in initialization, > > for parallel, offloading, tasking, worksharing constructs, ... > > You won't get far without that. > > I would like to use a specialized heap for OpenMP and not the general > purpose malloc(), etc.
I'd prefer not to clobber the generic code with that though. So, if you in some config/rtems/ header or overriding *.c file #undef strtoul #define strtoul(p, e, b) rtems_strtoul (p, e, b) and similarly for malloc, free, calloc, I won't object, but I'm against introducing gomp_strtoul, etc. (we do already have gomp_malloc, but expect free to be usable against that). Jakub