Lines Matching +full:mem +full:- +full:array

2  * kmp_environment.cpp -- Handle environment variables OS-independently.
5 //===----------------------------------------------------------------------===//
9 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
11 //===----------------------------------------------------------------------===//
14 act of loading a DLL on Windows* OS makes any user-set environment variables
20 1. Environment maintained by Windows* OS on IA-32 architecture. Accessible
26 putenv() function updates both C and Windows* OS on IA-32 architecture.
28 Windows* OS on IA-32 architecture functions work *only* with Windows* OS on
29 IA-32 architecture.
31 Windows* OS on IA-32 architecture maintained by OS, so there is always only
32 one Windows* OS on IA-32 architecture per process. Changes in Windows* OS on
33 IA-32 architecture are process-visible.
36 in the process, and each C RTL maintains its own environment. :-(
40 1. Set variables with putenv() function -- both C and Windows* OS on IA-32
41 architecture are being updated. Windows* OS on IA-32 architecture may be
44 2. Get variables with GetEnvironmentVariable() -- getenv() does not
45 search Windows* OS on IA-32 architecture, and can not see variables
48 2007-04-05 -- lev
100 act of loading a DLL on Windows* OS makes any user-set environment
179 // environment on IA-32 architecture. When application consumes
182 // responding... But this error message never appears. --ln
246 int count = 0; // Number of used elements in vars array.
266 // Allocate vars array.
277 // Save found variable in vars array.
289 block->bulk = bulk;
290 block->vars = vars;
291 block->count = count;
312 int count = 0; // Number of used elements in vars array.
343 // Allocate vars array.
354 // Save variable in vars array.
367 block->bulk = bulk;
368 block->vars = vars;
369 block->count = count;
373 /* Unix environment block is a array of pointers to variables, last pointer in
374 array is NULL:
411 [[maybe_unused]] size_t ssize = size - (var - bulk);
415 // Save found variable in vars array.
425 block->bulk = bulk;
426 block->vars = vars;
427 block->count = count;
442 char *mem = GetEnvironmentStrings();
443 if (mem == NULL) {
448 ___kmp_env_blk_parse_windows(block, mem);
449 FreeEnvironmentStrings(mem);
460 return strcmp(lhs->name, rhs->name);
467 qsort(CCAST(kmp_env_var_t *, block->vars), block->count,
477 KMP_INTERNAL_FREE(CCAST(kmp_env_var_t *, block->vars));
478 __kmp_str_free(&(block->bulk));
480 block->count = 0;
481 block->vars = NULL;
491 for (i = 0; i < block->count; ++i) {
492 if (strcmp(block->vars[i].name, name) == 0) {
493 return block->vars[i].value;