diff options
Diffstat (limited to 'usr/src/lib/libumem/common/umem.c')
-rw-r--r-- | usr/src/lib/libumem/common/umem.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/usr/src/lib/libumem/common/umem.c b/usr/src/lib/libumem/common/umem.c index 598a45eb39..9c5e3ec829 100644 --- a/usr/src/lib/libumem/common/umem.c +++ b/usr/src/lib/libumem/common/umem.c @@ -484,18 +484,17 @@ * ----------------------------------------------- * * The last piece of this puzzle is how we actually jam ptcmalloc() into the - * PLT. To handle this, we have defined two functions, _malloc and _free and - * used a special mapfile directive to place them into the a readable, - * writeable, and executable segment. Next we use a standard #pragma weak for - * malloc and free and direct them to those symbols. By default, those symbols - * have text defined as nops for our generated functions and when they're - * invoked, they jump to the default malloc and free functions. - * - * When umem_genasm() is called, it goes through and generates new malloc() and - * free() functions in the text provided for by _malloc and _free just after the - * jump. Once both have been successfully generated, umem_genasm() nops over the - * original jump so that we now call into the genasm versions of these - * functions. + * PLT. To handle this, we have defined two functions, _malloc and _free, we + * use a standard #pragma weak for malloc and free and direct them to those + * symbols. By default, those symbols have text defined as nops for our + * generated functions and when they're invoked, they jump to the default + * malloc and free functions. + * + * When umem_genasm() is called, it makes _malloc and _free writeable and goes + * through and updates the text provided for by _malloc and _free just after + * the jump. Once both have been successfully generated, umem_genasm() nops + * over the original jump so that we now call into the genasm versions of + * these functions, and makes the functions read-only once again. * * 8.3 umem_genasm() * ----------------- |