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
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
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 Archive
Alchemy Viewer
Commits
2437e340
Commit
2437e340
authored
5 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Fix a small alloc tracking bug with llspatialgroup
parent
504272ba
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/llcommon/llmemory.h
+0
-7
0 additions, 7 deletions
indra/llcommon/llmemory.h
indra/llcommon/lltrace.h
+13
-13
13 additions, 13 deletions
indra/llcommon/lltrace.h
indra/newview/llspatialpartition.h
+12
-10
12 additions, 10 deletions
indra/newview/llspatialpartition.h
with
25 additions
and
30 deletions
indra/llcommon/llmemory.h
+
0
−
7
View file @
2437e340
...
@@ -41,13 +41,6 @@ class LLMutex ;
...
@@ -41,13 +41,6 @@ class LLMutex ;
#define LL_CHECK_MEMORY
#define LL_CHECK_MEMORY
#endif
#endif
#if LL_WINDOWS
#define LL_ALIGN_OF __alignof
#else
#define LL_ALIGN_OF __align_of__
#endif
#if LL_WINDOWS
#if LL_WINDOWS
#if ADDRESS_SIZE == 64
#if ADDRESS_SIZE == 64
#define LL_DEFAULT_HEAP_ALIGN 16
#define LL_DEFAULT_HEAP_ALIGN 16
...
...
This diff is collapsed.
Click to expand it.
indra/llcommon/lltrace.h
+
13
−
13
View file @
2437e340
...
@@ -387,41 +387,41 @@ public:
...
@@ -387,41 +387,41 @@ public:
S32
getMemFootprint
()
const
{
return
mMemFootprint
;
}
S32
getMemFootprint
()
const
{
return
mMemFootprint
;
}
#endif
#endif
void
*
operator
new
(
size_t
size
)
template
<
int
CUSTOM_ALIGNMENT
>
static
void
*
aligned_new
(
size_t
size
)
{
{
#if LL_TRACE_ENABLED
#if LL_TRACE_ENABLED
claim_alloc
(
sMemStat
,
size
);
claim_alloc
(
sMemStat
,
size
);
#endif
#endif
return
ll_aligned_malloc
<
ALIGNMENT
>
(
size
);
return
ll_aligned_malloc
<
CUSTOM_
ALIGNMENT
>
(
size
);
}
}
template
<
int
CUSTOM_ALIGNMENT
>
template
<
int
CUSTOM_ALIGNMENT
>
static
void
*
aligned_
new
(
size_t
size
)
static
void
aligned_
delete
(
void
*
ptr
,
size_t
size
)
{
{
#if LL_TRACE_ENABLED
#if LL_TRACE_ENABLED
claim_alloc
(
sMemStat
,
size
);
dis
claim_alloc
(
sMemStat
,
size
);
#endif
#endif
return
ll_aligned_
malloc
<
CUSTOM_ALIGNMENT
>
(
size
);
ll_aligned_
free
<
CUSTOM_ALIGNMENT
>
(
ptr
);
}
}
void
operator
delete
(
void
*
ptr
,
size_t
size
)
void
*
operator
new
(
std
::
size_t
size
)
{
{
#if LL_TRACE_ENABLED
#if LL_TRACE_ENABLED
dis
claim_alloc
(
sMemStat
,
size
);
claim_alloc
(
sMemStat
,
size
);
#endif
#endif
ll_aligned_
free
<
ALIGNMENT
>
(
ptr
);
return
ll_aligned_
malloc
<
ALIGNMENT
>
(
size
);
}
}
template
<
int
CUSTOM_ALIGNMENT
>
void
operator
delete
(
void
*
ptr
,
std
::
size_t
size
)
static
void
aligned_delete
(
void
*
ptr
,
size_t
size
)
{
{
#if LL_TRACE_ENABLED
#if LL_TRACE_ENABLED
disclaim_alloc
(
sMemStat
,
size
);
disclaim_alloc
(
sMemStat
,
size
);
#endif
#endif
ll_aligned_free
<
CUSTOM_
ALIGNMENT
>
(
ptr
);
ll_aligned_free
<
ALIGNMENT
>
(
ptr
);
}
}
void
*
operator
new
[](
size_t
size
)
void
*
operator
new
[](
std
::
size_t
size
)
{
{
#if LL_TRACE_ENABLED
#if LL_TRACE_ENABLED
claim_alloc
(
sMemStat
,
size
);
claim_alloc
(
sMemStat
,
size
);
...
@@ -429,7 +429,7 @@ public:
...
@@ -429,7 +429,7 @@ public:
return
ll_aligned_malloc
<
ALIGNMENT
>
(
size
);
return
ll_aligned_malloc
<
ALIGNMENT
>
(
size
);
}
}
void
operator
delete
[](
void
*
ptr
,
size_t
size
)
void
operator
delete
[](
void
*
ptr
,
std
::
size_t
size
)
{
{
#if LL_TRACE_ENABLED
#if LL_TRACE_ENABLED
disclaim_alloc
(
sMemStat
,
size
);
disclaim_alloc
(
sMemStat
,
size
);
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llspatialpartition.h
+
12
−
10
View file @
2437e340
...
@@ -197,28 +197,30 @@ class LLSpatialGroup : public LLOcclusionCullingGroup
...
@@ -197,28 +197,30 @@ class LLSpatialGroup : public LLOcclusionCullingGroup
friend
class
LLOctreeStateCheck
;
friend
class
LLOctreeStateCheck
;
public:
public:
LLSpatialGroup
(
const
LLSpatialGroup
&
rhs
)
=
delete
;
const
LLSpatialGroup
&
operator
=
(
const
LLSpatialGroup
&
rhs
)
=
delete
;
// <alchemy>
// <alchemy>
void
*
operator
new
(
size_t
size
)
void
*
operator
new
(
std
::
size_t
size
)
{
{
return
ll_
aligned_
malloc
<
64
>
(
size
);
return
aligned_
new
<
64
>
(
size
);
}
}
void
operator
delete
(
void
*
ptr
)
void
operator
delete
(
void
*
ptr
,
std
::
size_t
size
)
{
{
ll_
aligned_
fre
e
<
64
>
(
ptr
);
aligned_
delet
e
<
64
>
(
ptr
,
size
);
}
}
// </alchemy>
LLSpatialGroup
(
const
LLSpatialGroup
&
rhs
)
:
LLOcclusionCullingGroup
(
rhs
)
void
*
operator
new
[](
std
::
size_t
size
)
{
{
*
this
=
rhs
;
return
aligned_new
<
64
>
(
size
)
;
}
}
const
LLSpatialGroup
&
operator
=
(
const
LLSpatialGroup
&
rhs
)
void
operator
delete
[](
void
*
ptr
,
std
::
size_t
size
)
{
{
LL_ERRS
()
<<
"Illegal operation!"
<<
LL_ENDL
;
aligned_delete
<
64
>
(
ptr
,
size
);
return
*
this
;
}
}
// </alchemy>
static
U32
sNodeCount
;
static
U32
sNodeCount
;
static
BOOL
sNoDelete
;
//deletion of spatial groups and draw info not allowed if TRUE
static
BOOL
sNoDelete
;
//deletion of spatial groups and draw info not allowed if TRUE
...
...
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