Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d192aa10
Commit
d192aa10
authored
Dec 08, 2022
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Dec 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Run the garbage collector every 30 seconds on a new object allocation.
Better heuristics can be used in the future. Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
809a91b8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
dispex.c
dlls/jscript/dispex.c
+5
-0
jscript.h
dlls/jscript/jscript.h
+1
-0
No files found.
dlls/jscript/dispex.c
View file @
d192aa10
...
...
@@ -945,6 +945,7 @@ HRESULT gc_run(script_ctx_t *ctx)
}
ctx
->
gc_is_unlinking
=
FALSE
;
ctx
->
gc_last_tick
=
GetTickCount
();
return
S_OK
;
}
...
...
@@ -2145,6 +2146,10 @@ HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *b
{
unsigned
i
;
/* FIXME: Use better heuristics to decide when to run the GC */
if
(
GetTickCount
()
-
ctx
->
gc_last_tick
>
30000
)
gc_run
(
ctx
);
TRACE
(
"%p (%p)
\n
"
,
dispex
,
prototype
);
dispex
->
IDispatchEx_iface
.
lpVtbl
=
&
DispatchExVtbl
;
...
...
dlls/jscript/jscript.h
View file @
d192aa10
...
...
@@ -379,6 +379,7 @@ struct _script_ctx_t {
heap_pool_t
tmp_heap
;
BOOL
gc_is_unlinking
;
DWORD
gc_last_tick
;
jsval_t
*
stack
;
unsigned
stack_top
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment