Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
4f5281a9
Commit
4f5281a9
authored
Dec 16, 2023
by
AUTOMATIC1111
Committed by
GitHub
Dec 16, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14227 from kingljl/kingljl-patch-memory-leak
Long running memory leak problem
parents
86b3aa94
c2bdbb67
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
7 deletions
+24
-7
webui.sh
webui.sh
+24
-7
No files found.
webui.sh
View file @
4f5281a9
...
...
@@ -222,13 +222,30 @@ fi
# Try using TCMalloc on Linux
prepare_tcmalloc
()
{
if
[[
"
${
OSTYPE
}
"
==
"linux"
*
]]
&&
[[
-z
"
${
NO_TCMALLOC
}
"
]]
&&
[[
-z
"
${
LD_PRELOAD
}
"
]]
;
then
TCMALLOC
=
"
$(
PATH
=
/sbin:
$PATH
ldconfig
-p
|
grep
-Po
"libtcmalloc(_minimal|)
\.
so
\.\d
"
|
head
-n
1
)
"
if
[[
!
-z
"
${
TCMALLOC
}
"
]]
;
then
echo
"Using TCMalloc:
${
TCMALLOC
}
"
export
LD_PRELOAD
=
"
${
TCMALLOC
}
"
else
printf
"
\e
[1m
\e
[31mCannot locate TCMalloc (improves CPU memory usage)
\e
[0m
\n
"
fi
# Define Tcmalloc Libs arrays
TCMALLOC_LIBS
=(
"libtcmalloc(_minimal|)
\.
so
\.\d
"
"libtcmalloc
\.
so
\.\d
"
)
# Traversal array
for
lib
in
"
${
TCMALLOC_LIBS
[@]
}
"
do
#Determine which type of tcmalloc library the library supports
TCMALLOC
=
"
$(
PATH
=
/usr/sbin:
$PATH
ldconfig
-p
|
grep
-P
$lib
|
head
-n
1
)
"
TC_INFO
=(
${
TCMALLOC
//=>/
}
)
if
[[
!
-z
"
${
TC_INFO
}
"
]]
;
then
echo
"Using TCMalloc:
${
TC_INFO
}
"
#Determine if the library is linked to libptthread and resolve undefined symbol: ptthread_Key_Create
if
ldd
${
TC_INFO
[2]
}
|
grep
-q
'libpthread'
;
then
echo
"
$TC_INFO
is linked with libpthread,execute LD_PRELOAD=
${
TC_INFO
}
"
export
LD_PRELOAD
=
"
${
TC_INFO
}
"
break
else
echo
"
$TC_INFO
is not linked with libpthreadand will trigger undefined symbol: ptthread_Key_Create error"
fi
else
printf
"
\e
[1m
\e
[31mCannot locate TCMalloc (improves CPU memory usage)
\e
[0m
\n
"
fi
done
fi
}
...
...
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