search for: switch_as

Displaying 2 results from an estimated 2 matches for "switch_as".

Did you mean: switch's
2007 Jun 26
2
RFC: multiple address spaces for one process
...E, MAP_SHARED|MAP_ANONYMOUS, 0, 0); if (p == MAP_FAILED){ deal with it } memcpy(p, (char *)sd, len); p = mremap(p, len, len, MREMAP_MAYMOVE|MREMAP_FIXED, (char *)sd); if (p == MAP_FAILED) deal with it } while (new_as() >= 0 && nas < NCONTEXTS) nas++; switch_as(0); After this, you can call switch_as in a signal handler running on a stack in the shared data region. Anything else is liable to lead to stack corruption or SEGFAULTs. There are a couple of places where the semantics could be changed. For instance if a process with multiple address spaces for...
2007 Jun 26
2
RFC: multiple address spaces for one process
...E, MAP_SHARED|MAP_ANONYMOUS, 0, 0); if (p == MAP_FAILED){ deal with it } memcpy(p, (char *)sd, len); p = mremap(p, len, len, MREMAP_MAYMOVE|MREMAP_FIXED, (char *)sd); if (p == MAP_FAILED) deal with it } while (new_as() >= 0 && nas < NCONTEXTS) nas++; switch_as(0); After this, you can call switch_as in a signal handler running on a stack in the shared data region. Anything else is liable to lead to stack corruption or SEGFAULTs. There are a couple of places where the semantics could be changed. For instance if a process with multiple address spaces for...