diff options
author | Elliott Hughes <enh@google.com> | 2009-11-13 17:07:00 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2009-11-13 17:12:48 -0800 |
commit | 845ce3cbfd6972542b275c95eddfbb6e94469737 (patch) | |
tree | 3f4c9ac0dd9f3787bacdb67b43ab76829ed4d608 /NativeCode.mk | |
parent | 25c2a2dcfb56959cf34e4e5e5496335be46c5e5c (diff) | |
download | libcore-845ce3cbfd6972542b275c95eddfbb6e94469737.zip libcore-845ce3cbfd6972542b275c95eddfbb6e94469737.tar.gz libcore-845ce3cbfd6972542b275c95eddfbb6e94469737.tar.bz2 |
Don't allocate arbitrary-length buffers on the stack.
A new LocalArray C++ class lets us specify a "reasonable" amount of stack to
use, but transparently fall back to using the heap if we need more space.
The three places I've chosen to use LocalArray in this patch are fairly
random; all they have in common is that they're the places where we call
GetStringUTFRegion. There are more places LocalArray will be useful: the
java.io.File JNI in particular.
Bug: 2257819
Diffstat (limited to 'NativeCode.mk')
-rw-r--r-- | NativeCode.mk | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/NativeCode.mk b/NativeCode.mk index 0dfad3b..57c4903 100644 --- a/NativeCode.mk +++ b/NativeCode.mk @@ -74,7 +74,7 @@ $(foreach dir, \ # Extract out the allowed LOCAL_* variables. Note: $(sort) also # removes duplicates. -core_c_includes := $(sort $(LOCAL_C_INCLUDES) $(JNI_H_INCLUDE)) +core_c_includes := $(sort dalvik/libcore/include $(LOCAL_C_INCLUDES) $(JNI_H_INCLUDE)) core_shared_libraries := $(sort $(LOCAL_SHARED_LIBRARIES)) core_static_libraries := $(sort $(LOCAL_STATIC_LIBRARIES)) @@ -118,4 +118,4 @@ ifeq ($(WITH_HOST_DALVIK),true) # TODO: Figure out cacerts.bks for the host. -endif
\ No newline at end of file +endif |