search for: switch_a

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

Did you mean: switch_as
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 fo...
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 fo...