Skip to content

Commit

Permalink
XXX Win32 mem log
Browse files Browse the repository at this point in the history
  • Loading branch information
khwilliamson committed Nov 22, 2023
1 parent 5412de8 commit 66fcf37
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions util.c
Expand Up @@ -4888,6 +4888,14 @@ S_mem_log_common(enum mem_log_type mlt, const UV n,

PERL_ARGS_ASSERT_MEM_LOG_COMMON;

#ifdef WIN32

if (PL_phase == PERL_PHASE_CONSTRUCT) {
return;
}

#endif

PL_mem_log[0] |= 0x2; /* Flag that the call is from this code */
pmlenv = PerlEnv_getenv("PERL_MEM_LOG");
PL_mem_log[0] &= ~0x2;
Expand Down
4 changes: 3 additions & 1 deletion win32/perlhost.h
Expand Up @@ -453,7 +453,9 @@ const struct IPerlMem perlMemParse =
char*
PerlEnvGetenv(struct IPerlEnv* piPerl, const char *varname)
{
return IPERL2HOST(piPerl)->Getenv(varname);

// The mortal version causes run/switchd.t et. al. to fail
return IPERL2HOST(piPerl)->Getenv(varname); //Perl_mortal_getenv(varname);
};

int
Expand Down

0 comments on commit 66fcf37

Please sign in to comment.