Last change
on this file since 5b643ea was
55b060d,
checked in by Peter A. Buhr <pabuhr@…>, 14 months ago
|
rename directories containers to collections
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[0f781fb8] | 1 | // |
---|
| 2 | // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo |
---|
| 3 | // |
---|
| 4 | // The contents of this file are covered under the licence agreement in the |
---|
| 5 | // file "LICENCE" distributed with Cforall. |
---|
| 6 | // |
---|
| 7 | // string_sharectx -- utility for controlling string sharing / isolation |
---|
| 8 | // |
---|
| 9 | // Author : Michael L. Brooks |
---|
| 10 | // Created On : Fri Sep 03 11:00:00 2021 |
---|
| 11 | // Last Modified By : Michael L. Brooks |
---|
| 12 | // Last Modified On : Fri Sep 03 11:00:00 2021 |
---|
| 13 | // Update Count : 1 |
---|
| 14 | // |
---|
| 15 | |
---|
| 16 | #pragma once |
---|
| 17 | |
---|
[accc9df9] | 18 | #pragma GCC visibility push(default) |
---|
| 19 | |
---|
[0f781fb8] | 20 | //######################### String Sharing Context ######################### |
---|
| 21 | |
---|
| 22 | struct VbyteHeap; |
---|
| 23 | |
---|
[accc9df9] | 24 | // A string_sharectx |
---|
[0f781fb8] | 25 | // |
---|
| 26 | // Usage: |
---|
| 27 | // void bar() { |
---|
| 28 | // c(); |
---|
| 29 | // string_sharectx c = {NEW_SHARING}; |
---|
| 30 | // d(); |
---|
| 31 | // } |
---|
| 32 | // void foo() { |
---|
| 33 | // a(); |
---|
| 34 | // string_sharectx c = {NO_SHARING}; |
---|
| 35 | // b(); |
---|
| 36 | // bar(); |
---|
| 37 | // e(); |
---|
| 38 | // } |
---|
| 39 | // int main() { |
---|
| 40 | // foo(); |
---|
| 41 | // } |
---|
| 42 | // |
---|
| 43 | // a, d: share string character ranges within themselves, not with each other |
---|
| 44 | // b, c, e: never share anything |
---|
| 45 | // |
---|
| 46 | struct string_sharectx { |
---|
| 47 | // private |
---|
| 48 | VbyteHeap * activeHeap; |
---|
| 49 | string_sharectx * older; |
---|
| 50 | }; |
---|
| 51 | |
---|
| 52 | enum StringSharectx_Mode { NEW_SHARING, NO_SHARING }; |
---|
| 53 | |
---|
| 54 | void ?{}( string_sharectx &, StringSharectx_Mode ); |
---|
| 55 | void ^?{}( string_sharectx & ); |
---|
| 56 | |
---|
| 57 | void ?{}( string_sharectx & ) = void; |
---|
| 58 | void ?{}( string_sharectx &, string_sharectx ) = void; |
---|
| 59 | void ?=?( string_sharectx &, string_sharectx ) = void; |
---|
| 60 | |
---|
Note: See
TracBrowser
for help on using the repository browser.