PyCyBase 0.1.8.post4__cp313-cp313-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. cbase/__infra__.pxd +6 -0
  2. cbase/__init__.pxd +6 -0
  3. cbase/__init__.py +28 -0
  4. cbase/allocator_protocol/__infra__.pxd +58 -0
  5. cbase/allocator_protocol/__init__.pxd +58 -0
  6. cbase/allocator_protocol/__init__.py +45 -0
  7. cbase/allocator_protocol/c_allocator_protocol.c +31818 -0
  8. cbase/allocator_protocol/c_allocator_protocol.cp313-win_amd64.pyd +0 -0
  9. cbase/allocator_protocol/c_allocator_protocol.h +352 -0
  10. cbase/allocator_protocol/c_allocator_protocol.pxd +64 -0
  11. cbase/allocator_protocol/c_allocator_protocol.pyi +144 -0
  12. cbase/allocator_protocol/c_allocator_protocol.pyx +209 -0
  13. cbase/allocator_protocol/c_heap_allocator.c +38144 -0
  14. cbase/allocator_protocol/c_heap_allocator.cp313-win_amd64.pyd +0 -0
  15. cbase/allocator_protocol/c_heap_allocator.h +444 -0
  16. cbase/allocator_protocol/c_heap_allocator.pxd +97 -0
  17. cbase/allocator_protocol/c_heap_allocator.pyi +161 -0
  18. cbase/allocator_protocol/c_heap_allocator.pyx +300 -0
  19. cbase/allocator_protocol/c_nt_shm_allocator.c +33399 -0
  20. cbase/allocator_protocol/c_nt_shm_allocator.cp313-win_amd64.pyd +0 -0
  21. cbase/allocator_protocol/c_nt_shm_allocator.h +996 -0
  22. cbase/allocator_protocol/c_nt_shm_allocator.pxd +102 -0
  23. cbase/allocator_protocol/c_nt_shm_allocator.pyx +223 -0
  24. cbase/allocator_protocol/c_shm_allocator.h +1168 -0
  25. cbase/allocator_protocol/c_shm_allocator.pxd +142 -0
  26. cbase/allocator_protocol/c_shm_allocator.pyi +299 -0
  27. cbase/allocator_protocol/c_shm_allocator.pyx +442 -0
  28. cbase/allocator_protocol/c_shm_comp.c +4643 -0
  29. cbase/allocator_protocol/c_shm_comp.cp313-win_amd64.pyd +0 -0
  30. cbase/allocator_protocol/c_shm_comp.h +49 -0
  31. cbase/allocator_protocol/c_shm_comp.pxd +38 -0
  32. cbase/allocator_protocol/c_shm_comp.pyx +1 -0
  33. cbase/backports/__infra__.pxd +17 -0
  34. cbase/backports/__init__.pxd +17 -0
  35. cbase/backports/__init__.py +9 -0
  36. cbase/backports/pydict.h +55 -0
  37. cbase/backports/pydict.pxd +5 -0
  38. cbase/backports/pylong.c +9946 -0
  39. cbase/backports/pylong.cp313-win_amd64.pyd +0 -0
  40. cbase/backports/pylong.h +79 -0
  41. cbase/backports/pylong.pxd +23 -0
  42. cbase/backports/pylong.pyx +61 -0
  43. cbase/bytemap/__infra__.pxd +42 -0
  44. cbase/bytemap/__init__.pxd +42 -0
  45. cbase/bytemap/__init__.py +21 -0
  46. cbase/bytemap/c_bytemap.c +52076 -0
  47. cbase/bytemap/c_bytemap.cp313-win_amd64.pyd +0 -0
  48. cbase/bytemap/c_bytemap.h +867 -0
  49. cbase/bytemap/c_bytemap.pxd +370 -0
  50. cbase/bytemap/c_bytemap.pyx +1758 -0
  51. cbase/bytemap/xxh3.h +55 -0
  52. cbase/bytemap/xxhash.c +42 -0
  53. cbase/bytemap/xxhash.h +7487 -0
  54. cbase/env.c +11109 -0
  55. cbase/env.cp313-win_amd64.pyd +0 -0
  56. cbase/env.pxd +8 -0
  57. cbase/env.pyi +48 -0
  58. cbase/env.pyx +46 -0
  59. cbase/includes/cbase/allocator_protocol/c_allocator_protocol.c +31818 -0
  60. cbase/includes/cbase/allocator_protocol/c_allocator_protocol.h +352 -0
  61. cbase/includes/cbase/allocator_protocol/c_heap_allocator.c +38144 -0
  62. cbase/includes/cbase/allocator_protocol/c_heap_allocator.h +444 -0
  63. cbase/includes/cbase/allocator_protocol/c_nt_shm_allocator.c +33399 -0
  64. cbase/includes/cbase/allocator_protocol/c_nt_shm_allocator.h +996 -0
  65. cbase/includes/cbase/allocator_protocol/c_shm_allocator.h +1168 -0
  66. cbase/includes/cbase/allocator_protocol/c_shm_comp.c +4643 -0
  67. cbase/includes/cbase/allocator_protocol/c_shm_comp.h +49 -0
  68. cbase/includes/cbase/backports/pydict.h +55 -0
  69. cbase/includes/cbase/backports/pylong.c +9946 -0
  70. cbase/includes/cbase/backports/pylong.h +79 -0
  71. cbase/includes/cbase/bytemap/c_bytemap.c +52076 -0
  72. cbase/includes/cbase/bytemap/c_bytemap.h +867 -0
  73. cbase/includes/cbase/bytemap/xxh3.h +55 -0
  74. cbase/includes/cbase/bytemap/xxhash.c +42 -0
  75. cbase/includes/cbase/bytemap/xxhash.h +7487 -0
  76. cbase/includes/cbase/env.c +11109 -0
  77. cbase/includes/cbase/int128.h +81 -0
  78. cbase/includes/cbase/intern_string/c_intern_string.c +28081 -0
  79. cbase/includes/cbase/intern_string/c_intern_string.h +614 -0
  80. cbase/includes/cbase/nt/pthread_nt_compat.h +102 -0
  81. cbase/includes/cbase/nt/regex_nt_compat.h +133 -0
  82. cbase/includes/cbase/nt/time_sched_nt_compat.h +32 -0
  83. cbase/int128.h +81 -0
  84. cbase/int128.pxd +15 -0
  85. cbase/intern_string/BENCHMARK.md +157 -0
  86. cbase/intern_string/__infra__.pxd +11 -0
  87. cbase/intern_string/__init__.pxd +11 -0
  88. cbase/intern_string/__init__.py +19 -0
  89. cbase/intern_string/c_intern_string.c +28081 -0
  90. cbase/intern_string/c_intern_string.cp313-win_amd64.pyd +0 -0
  91. cbase/intern_string/c_intern_string.h +614 -0
  92. cbase/intern_string/c_intern_string.pxd +118 -0
  93. cbase/intern_string/c_intern_string.pyi +376 -0
  94. cbase/intern_string/c_intern_string.pyx +765 -0
  95. cbase/nt/pthread_nt_compat.h +102 -0
  96. cbase/nt/regex_nt_compat.h +133 -0
  97. cbase/nt/time_sched_nt_compat.h +32 -0
  98. pycybase-0.1.8.post4.dist-info/METADATA +180 -0
  99. pycybase-0.1.8.post4.dist-info/RECORD +101 -0
  100. pycybase-0.1.8.post4.dist-info/WHEEL +5 -0
  101. pycybase-0.1.8.post4.dist-info/top_level.txt +1 -0
@@ -0,0 +1,102 @@
1
+
2
+ cdef extern from "cbase/allocator_protocol/c_nt_shm_allocator.h":
3
+ const size_t AP_SHM_AUTOPAGE_CAPACITY
4
+ const size_t AP_SHM_AUTOPAGE_CAPACITY_MAX
5
+ const size_t AP_SHM_AUTOPAGE_ALIGNMENT
6
+ const char* AP_SHM_ALLOCATOR_PREFIX
7
+ const size_t AP_SHM_NAME_LEN
8
+ const size_t AP_SHM_PREFIX_MAX
9
+ const size_t AP_SHM_ALLOCATOR_DEFAULT_REGION_SIZE
10
+ const size_t c_nt_shm_page_overhead
11
+ const size_t c_nt_shm_block_overhead
12
+
13
+ ctypedef unsigned long DWORD
14
+
15
+ ctypedef struct pthread_mutex_t:
16
+ pass
17
+
18
+ ctypedef struct nt_shm_page:
19
+ size_t capacity
20
+ size_t occupied
21
+ size_t offset
22
+ nt_shm_allocator* allocator
23
+ nt_shm_memory_block* allocated
24
+ char shm_name[AP_SHM_NAME_LEN]
25
+ char prev_name[AP_SHM_NAME_LEN]
26
+
27
+ ctypedef struct nt_shm_page_ctx:
28
+ nt_shm_page* shm_page
29
+ void* handle
30
+ char* buffer
31
+ nt_shm_page_ctx* prev
32
+
33
+ ctypedef struct nt_shm_memory_block:
34
+ size_t capacity
35
+ size_t size
36
+ nt_shm_memory_block* next_free
37
+ nt_shm_memory_block* next_allocated
38
+ nt_shm_page* parent_page
39
+ char buffer[]
40
+
41
+ ctypedef struct nt_shm_allocator:
42
+ char shm_name[AP_SHM_NAME_LEN]
43
+ size_t pid
44
+ char lock_name[AP_SHM_NAME_LEN]
45
+ size_t mapped_size
46
+ char active_page[AP_SHM_NAME_LEN]
47
+ size_t mapped_pages
48
+ nt_shm_memory_block* free_list
49
+ size_t autopage_capacity
50
+ size_t autopage_capacity_max
51
+ size_t autopage_alignment
52
+ char shm_prefix[AP_SHM_PREFIX_MAX]
53
+ pthread_mutex_t lock
54
+
55
+ ctypedef struct nt_shm_allocator_ctx:
56
+ nt_shm_allocator* shm_allocator
57
+ void* shm_handle
58
+ void* lock_handle
59
+ nt_shm_page_ctx* active_page
60
+
61
+ int pthread_mutex_init(pthread_mutex_t* mutex, void* attr)
62
+ int pthread_mutex_lock(pthread_mutex_t* mutex)
63
+ int pthread_mutex_unlock(pthread_mutex_t* mutex)
64
+ int pthread_mutex_destroy(pthread_mutex_t* mutex)
65
+
66
+ size_t c_nt_shm_page_roundup(nt_shm_allocator* allocator, size_t size)
67
+ size_t c_nt_shm_block_roundup(size_t size)
68
+ void c_nt_shm_allocator_name(const char* shm_prefix, char* out)
69
+ void c_nt_shm_page_name(nt_shm_allocator* allocator, char* out)
70
+ void c_nt_shm_mutex_name(const char* shm_prefix, char* out)
71
+ int c_nt_shm_scan(const char* prefix, const char* suffix, char* out, size_t out_len)
72
+ nt_shm_page_ctx* c_nt_shm_page_new(nt_shm_allocator* allocator, size_t page_capacity)
73
+ int c_nt_shm_page_map(nt_shm_allocator* allocator, nt_shm_page_ctx* page_ctx)
74
+ void c_nt_shm_page_reclaim(nt_shm_allocator* allocator, nt_shm_page_ctx* page_ctx)
75
+
76
+ nt_shm_page_ctx* c_nt_shm_allocator_extend(nt_shm_allocator_ctx* ctx, size_t capacity, pthread_mutex_t* lock)
77
+ nt_shm_allocator_ctx* c_nt_shm_allocator_new(size_t region_size, const char* shm_prefix)
78
+ void c_nt_shm_allocator_free(nt_shm_allocator_ctx* ctx)
79
+ void* c_nt_shm_calloc(nt_shm_allocator_ctx* ctx, size_t size, pthread_mutex_t* lock)
80
+ void* c_nt_shm_request(nt_shm_allocator_ctx* ctx, size_t size, int scan_all_pages, pthread_mutex_t* lock)
81
+ void c_nt_shm_free(void* ptr, pthread_mutex_t* lock)
82
+ void c_nt_shm_reclaim(nt_shm_allocator_ctx* ctx, pthread_mutex_t* lock)
83
+ int c_nt_shm_scan_allocator(const char* shm_prefix, char* out)
84
+ int c_nt_shm_scan_page(const char* shm_prefix, char* out)
85
+ DWORD c_nt_shm_pid(const char* shm_name)
86
+ nt_shm_allocator* c_nt_shm_allocator_dangling(const char* shm_prefix, char* shm_name)
87
+ void c_nt_shm_clear_dangling(const char* shm_prefix)
88
+
89
+
90
+ cdef class NtSharedMemoryAllocator:
91
+ cdef nt_shm_allocator_ctx* ctx
92
+ cdef readonly bint owner
93
+
94
+ cdef inline void* c_calloc(self, size_t size, pthread_mutex_t* lock=?)
95
+ cdef inline void* c_request(self, size_t size, int scan_all_pages=?, pthread_mutex_t* lock=?)
96
+ cdef inline void c_free(self, void* ptr, pthread_mutex_t* lock=?)
97
+
98
+ cpdef object calloc(self, size_t size, bint with_lock=?)
99
+ cpdef object request(self, size_t size, bint scan_all_pages=?, bint with_lock=?)
100
+ cpdef void free(self, object buffer, bint with_lock=?)
101
+ cpdef void reclaim(self, bint with_lock=?)
102
+ cpdef object extend(self, size_t capacity=?, bint with_lock=?)
@@ -0,0 +1,223 @@
1
+ """NT-native shared memory allocator (Windows-only).
2
+
3
+ Provides NtSharedMemoryAllocator — a crude, test-focused wrapper around
4
+ c_nt_shm_allocator.h. Uses Windows kernel objects (CreateFileMappingW,
5
+ MapViewOfFile, named mutexes) instead of POSIX SHM.
6
+ """
7
+ from cpython.unicode cimport PyUnicode_FromString, PyUnicode_AsUTF8
8
+ from libc.errno cimport errno
9
+
10
+
11
+ cdef class NtSharedMemoryAllocator:
12
+ """Windows-native shared memory allocator.
13
+
14
+ Mirrors the POSIX SharedMemoryAllocator API but uses NT kernel objects:
15
+ - CreateFileMappingW for named shared memory
16
+ - MapViewOfFile / UnmapViewOfFile for mapping
17
+ - CreateMutexW for inter-process synchronization
18
+ """
19
+
20
+ def __init__(
21
+ self,
22
+ size_t region_size=AP_SHM_ALLOCATOR_DEFAULT_REGION_SIZE,
23
+ str shm_prefix=None
24
+ ):
25
+ if not region_size:
26
+ return
27
+ cdef const char* prefix = PyUnicode_AsUTF8(shm_prefix) if shm_prefix else NULL
28
+ self.ctx = c_nt_shm_allocator_new(region_size, prefix)
29
+ if not self.ctx:
30
+ raise OSError(errno, "Initialize NT SHM allocator failed")
31
+ self.owner = True
32
+
33
+ def __dealloc__(self):
34
+ if not self.owner:
35
+ return
36
+ if self.ctx:
37
+ c_nt_shm_allocator_free(self.ctx)
38
+
39
+ cdef inline void* c_calloc(self, size_t size, pthread_mutex_t* lock=NULL):
40
+ if not self.ctx:
41
+ raise RuntimeError(f"Uninitialized <{self.__class__.__name__}>")
42
+ return c_nt_shm_calloc(self.ctx, size, lock)
43
+
44
+ cdef inline void* c_request(self, size_t size, int scan_all_pages=1, pthread_mutex_t* lock=NULL):
45
+ if not self.ctx:
46
+ raise RuntimeError(f"Uninitialized <{self.__class__.__name__}>")
47
+ return c_nt_shm_request(self.ctx, size, scan_all_pages, lock)
48
+
49
+ cdef inline void c_free(self, void* ptr, pthread_mutex_t* lock=NULL):
50
+ if not self.ctx:
51
+ raise RuntimeError(f"Uninitialized <{self.__class__.__name__}>")
52
+ c_nt_shm_free(ptr, lock)
53
+
54
+ def __repr__(self):
55
+ if self.ctx and self.ctx.shm_allocator:
56
+ return (
57
+ f"<{self.__class__.__name__}"
58
+ f"(name={self.name}, pid={self.pid})>"
59
+ )
60
+ return f"<{self.__class__.__name__}(uninitialized)>"
61
+
62
+ # -- Public Python API ---------------------------------------------------
63
+
64
+ cpdef object calloc(self, size_t size, bint with_lock=True):
65
+ """Allocate zeroed memory. Returns a read-write memoryview of ``size`` bytes."""
66
+ if not self.ctx:
67
+ raise RuntimeError(f"Uninitialized <{self.__class__.__name__}>")
68
+ cdef pthread_mutex_t* lock = &self.ctx.shm_allocator.lock if with_lock else NULL
69
+ cdef void* p = c_nt_shm_calloc(self.ctx, size, lock)
70
+ if not p:
71
+ raise OSError(
72
+ errno,
73
+ f"<{self.__class__.__name__}> failed to calloc {size} bytes",
74
+ )
75
+ cdef unsigned char[:] view = <unsigned char[:size]>p
76
+ return view
77
+
78
+ cpdef object request(self, size_t size, bint scan_all_pages=True, bint with_lock=True):
79
+ """Allocate memory (reuses freed blocks). Returns a read-write memoryview."""
80
+ if not self.ctx:
81
+ raise RuntimeError(f"Uninitialized <{self.__class__.__name__}>")
82
+ cdef pthread_mutex_t* lock = &self.ctx.shm_allocator.lock if with_lock else NULL
83
+ cdef void* p = c_nt_shm_request(self.ctx, size, scan_all_pages, lock)
84
+ if not p:
85
+ raise OSError(
86
+ errno,
87
+ f"<{self.__class__.__name__}> failed to request {size} bytes",
88
+ )
89
+ cdef unsigned char[:] view = <unsigned char[:size]>p
90
+ return view
91
+
92
+ cpdef void free(self, object buffer, bint with_lock=True):
93
+ """Return a previously allocated buffer to the free list."""
94
+ if not self.ctx:
95
+ raise RuntimeError(f"Uninitialized <{self.__class__.__name__}>")
96
+ if buffer is None:
97
+ return
98
+ cdef const unsigned char[::1] view = buffer
99
+ cdef void* ptr = <void*>&view[0]
100
+ cdef pthread_mutex_t* lock = &self.ctx.shm_allocator.lock if with_lock else NULL
101
+ if ptr:
102
+ c_nt_shm_free(ptr, lock)
103
+
104
+ cpdef void reclaim(self, bint with_lock=True):
105
+ """Run best-effort reclaim of freed blocks across all pages."""
106
+ if not self.ctx:
107
+ raise RuntimeError(f"Uninitialized <{self.__class__.__name__}>")
108
+ cdef pthread_mutex_t* lock = &self.ctx.shm_allocator.lock if with_lock else NULL
109
+ c_nt_shm_reclaim(self.ctx, lock)
110
+
111
+ cpdef object extend(self, size_t capacity=0, bint with_lock=True):
112
+ """Manually extend the allocator with a new page."""
113
+ if not self.ctx:
114
+ raise RuntimeError(f"Uninitialized <{self.__class__.__name__}>")
115
+ cdef pthread_mutex_t* lock = &self.ctx.shm_allocator.lock if with_lock else NULL
116
+ cdef nt_shm_page_ctx* page = c_nt_shm_allocator_extend(
117
+ self.ctx, capacity, lock,
118
+ )
119
+ if not page:
120
+ raise OSError(
121
+ errno,
122
+ f"<{self.__class__.__name__}> failed to extend new page",
123
+ )
124
+ return {
125
+ "capacity": <size_t>page.shm_page.capacity,
126
+ "occupied": <size_t>page.shm_page.occupied,
127
+ "name": PyUnicode_FromString(page.shm_page.shm_name),
128
+ }
129
+
130
+ # -- Scanning / housekeeping ---------------------------------------------
131
+
132
+ def dangling(self, str shm_prefix=None):
133
+ """List allocator SHM objects whose creating process is dead."""
134
+ cdef char out[AP_SHM_NAME_LEN]
135
+ cdef const char* prefix = (
136
+ PyUnicode_AsUTF8(shm_prefix) if shm_prefix else NULL
137
+ )
138
+ cdef nt_shm_allocator* found = c_nt_shm_allocator_dangling(prefix, out)
139
+ if found:
140
+ return [PyUnicode_FromString(out)]
141
+ return []
142
+
143
+ def cleanup_dangling(self, str shm_prefix=None):
144
+ """Unlink all dangling allocator/page SHM objects."""
145
+ c_nt_shm_clear_dangling(
146
+ PyUnicode_AsUTF8(shm_prefix) if shm_prefix else NULL
147
+ )
148
+
149
+ # -- Properties ----------------------------------------------------------
150
+
151
+ property name:
152
+ def __get__(self) -> str:
153
+ if not self.ctx or not self.ctx.shm_allocator:
154
+ return None
155
+ return PyUnicode_FromString(self.ctx.shm_allocator.shm_name)
156
+
157
+ property pid:
158
+ def __get__(self):
159
+ if not self.ctx or not self.ctx.shm_allocator:
160
+ return -1
161
+ return <DWORD>self.ctx.shm_allocator.pid
162
+
163
+ property mapped_size:
164
+ def __get__(self):
165
+ if not self.ctx or not self.ctx.shm_allocator:
166
+ return -1
167
+ return <size_t>self.ctx.shm_allocator.mapped_size
168
+
169
+ property mapped_pages:
170
+ def __get__(self):
171
+ if not self.ctx or not self.ctx.shm_allocator:
172
+ return -1
173
+ return <size_t>self.ctx.shm_allocator.mapped_pages
174
+
175
+ property autopage_capacity:
176
+ def __get__(self):
177
+ if not self.ctx or not self.ctx.shm_allocator:
178
+ raise RuntimeError(f"Uninitialized <{self.__class__.__name__}>")
179
+ return <size_t>self.ctx.shm_allocator.autopage_capacity
180
+
181
+ def __set__(self, size_t value):
182
+ if not self.ctx or not self.ctx.shm_allocator:
183
+ raise RuntimeError(f"Uninitialized <{self.__class__.__name__}>")
184
+ self.ctx.shm_allocator.autopage_capacity = value
185
+
186
+ property autopage_capacity_max:
187
+ def __get__(self):
188
+ if not self.ctx or not self.ctx.shm_allocator:
189
+ raise RuntimeError(f"Uninitialized <{self.__class__.__name__}>")
190
+ return <size_t>self.ctx.shm_allocator.autopage_capacity_max
191
+
192
+ def __set__(self, size_t value):
193
+ if not self.ctx or not self.ctx.shm_allocator:
194
+ raise RuntimeError(f"Uninitialized <{self.__class__.__name__}>")
195
+ self.ctx.shm_allocator.autopage_capacity_max = value
196
+
197
+ property autopage_alignment:
198
+ def __get__(self):
199
+ if not self.ctx or not self.ctx.shm_allocator:
200
+ raise RuntimeError(f"Uninitialized <{self.__class__.__name__}>")
201
+ return <size_t>self.ctx.shm_allocator.autopage_alignment
202
+
203
+ def __set__(self, size_t value):
204
+ if not self.ctx or not self.ctx.shm_allocator:
205
+ raise RuntimeError(f"Uninitialized <{self.__class__.__name__}>")
206
+ self.ctx.shm_allocator.autopage_alignment = value
207
+
208
+ property shm_prefix:
209
+ def __get__(self) -> str:
210
+ if not self.ctx or not self.ctx.shm_allocator:
211
+ return None
212
+ return PyUnicode_FromString(self.ctx.shm_allocator.shm_prefix)
213
+
214
+
215
+ # -- Module-level constant exports -------------------------------------------
216
+
217
+ globals()['AP_SHM_AUTOPAGE_CAPACITY'] = AP_SHM_AUTOPAGE_CAPACITY
218
+ globals()['AP_SHM_AUTOPAGE_CAPACITY_MAX'] = AP_SHM_AUTOPAGE_CAPACITY_MAX
219
+ globals()['AP_SHM_AUTOPAGE_ALIGNMENT'] = AP_SHM_AUTOPAGE_ALIGNMENT
220
+ globals()['AP_SHM_ALLOCATOR_PREFIX'] = PyUnicode_FromString(AP_SHM_ALLOCATOR_PREFIX)
221
+ globals()['AP_SHM_NAME_LEN'] = AP_SHM_NAME_LEN
222
+ globals()['AP_SHM_PREFIX_MAX'] = AP_SHM_PREFIX_MAX
223
+ globals()['AP_SHM_ALLOCATOR_DEFAULT_REGION_SIZE'] = AP_SHM_ALLOCATOR_DEFAULT_REGION_SIZE