Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
bc39ad91
Commit
bc39ad91
authored
16 years ago
by
Brian McGroarty
Browse files
Options
Downloads
Patches
Plain Diff
DEV-18283 Remove nonsense mem-checking debug code
parent
35b4a911
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/llappviewer.cpp
+0
-45
0 additions, 45 deletions
indra/newview/llappviewer.cpp
with
0 additions
and
45 deletions
indra/newview/llappviewer.cpp
+
0
−
45
View file @
bc39ad91
...
@@ -322,48 +322,6 @@ void idle_afk_check()
...
@@ -322,48 +322,6 @@ void idle_afk_check()
}
}
}
}
//this function checks if the system can allocate (num_chunk)MB memory successfully.
//if this check fails, the allocated memory is NOT freed.
void
idle_mem_check
(
S32
num_chunk
)
{
//this flag signals if memory allocation check is necessary
static
BOOL
check
=
TRUE
;
if
(
!
check
)
//if memory check fails before, do not repeat it.
{
return
;
}
check
=
FALSE
;
//before memory check for this frame, turn off check signal for the next frame.
S32
i
=
0
;
char
**
p
=
new
char
*
[
num_chunk
]
;
if
(
!
p
)
{
return
;
}
for
(
i
=
0
;
i
<
num_chunk
;
i
++
)
{
//1MB per chunk
//if the allocation fails, the system should catch it.
p
[
i
]
=
new
char
[
1024
*
1024
]
;
if
(
!
p
[
i
])
//in case that system try-catch is turned off
{
return
;
}
}
//release memory if the allocation check does not fail.
for
(
i
=
0
;
i
<
num_chunk
;
i
++
)
{
delete
[]
p
[
i
]
;
}
delete
[]
p
;
//memory check for this frame succeeds, turn on next frame check.
check
=
TRUE
;
}
// A callback set in LLAppViewer::init()
// A callback set in LLAppViewer::init()
static
void
ui_audio_callback
(
const
LLUUID
&
uuid
)
static
void
ui_audio_callback
(
const
LLUUID
&
uuid
)
{
{
...
@@ -943,9 +901,6 @@ bool LLAppViewer::mainLoop()
...
@@ -943,9 +901,6 @@ bool LLAppViewer::mainLoop()
}
}
#endif
#endif
//at the beginning of every frame, check if the system can successfully allocate 10 * 1 MB memory.
idle_mem_check
(
10
)
;
if
(
!
LLApp
::
isExiting
())
if
(
!
LLApp
::
isExiting
())
{
{
pingMainloopTimeout
(
"Main:JoystickKeyboard"
);
pingMainloopTimeout
(
"Main:JoystickKeyboard"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment