Searched defs:bytes (Results 1 - 12 of 12) sorted by relevance

/system/core/libutils/
H A DJenkinsHash.cpp33 uint32_t JenkinsHashMixBytes(uint32_t hash, const uint8_t* bytes, size_t size) { argument
37 uint32_t data = bytes[i] | (bytes[i+1] << 8) | (bytes[i+2] << 16) | (bytes[i+3] << 24);
41 uint32_t data = bytes[i];
42 data |= ((size & 3) > 1) ? (bytes[i+1] << 8) : 0;
43 data |= ((size & 3) > 2) ? (bytes[i+2] << 16) : 0;
H A DBasicHashtable.cpp246 size_t bytes = count * mBucketSize; local
247 SharedBuffer* sb = SharedBuffer::alloc(bytes);
248 LOG_ALWAYS_FATAL_IF(!sb, "Could not allocate %u bytes for hashtable with %u buckets.",
249 uint32_t(bytes), uint32_t(count));
H A DString8.cpp99 const ssize_t bytes = utf16_to_utf8_length(in, len); local
100 if (bytes < 0) {
104 SharedBuffer* buf = SharedBuffer::alloc(bytes+1);
121 const ssize_t bytes = utf32_to_utf8_length(in, len); local
122 if (bytes < 0) {
126 SharedBuffer* buf = SharedBuffer::alloc(bytes+1);
286 const size_t otherLen = other.bytes();
287 if (bytes() == 0) {
304 if (bytes() == 0) {
342 const size_t myLen = bytes();
[all...]
H A DUnicode.cpp58 // indexed by number of bytes in the sequence.
76 * Return number of UTF-8 bytes required for the character. If the character
81 // Figure out how many bytes the result will require.
105 static inline void utf32_codepoint_to_utf8(uint8_t* dstP, char32_t srcChar, size_t bytes) argument
107 dstP += bytes;
108 switch (bytes)
113 case 1: *--dstP = (uint8_t)(srcChar | kFirstByteMark[bytes]);
417 // surrogate pairs are always 4 bytes.
/system/core/include/utils/
H A DString8.h69 inline size_t bytes() const;
273 inline size_t String8::bytes() const function in class:android::String8
/system/core/libcutils/tests/memset_mips/
H A Dtest_memset.c56 timeone(void (*fn)(), void *d, uint32_t val, uint32_t bytes) argument
60 (*fn)(d, val, bytes);
67 /* define VERIFY to check that memset only touches the bytes it's supposed to */
96 n = minbytes + (rand() % (maxbytes-minbytes)); /* How many bytes to do */
/system/core/toolbox/
H A Ddd.h67 uint64_t bytes; /* # of bytes written */ member in struct:__anon245
/system/extras/memtrack/
H A Dmemtrack.cpp70 ssize_t bytes; local
73 bytes = read(fd_, data_ + len_, max_ - len_);
74 if (bytes == 0 || bytes == -1) {
78 len_ += bytes;
137 ssize_t bytes = read(fd, cmd_name_, sizeof(cmd_name_)); local
139 if (bytes == -1 || bytes == 0) {
/system/core/libcorkscrew/arch-x86/
H A Dbacktrace-x86.c106 /* TODO: x86 instructions are 1-16 bytes, to define exact size of previous instruction
135 /* Getting X bytes. 4 is maximum for now. */
136 static bool try_get_xbytes(const memory_t* memory, uintptr_t ptr, uint32_t* out_value, uint8_t bytes, uint32_t* cursor) { argument
138 if (bytes > 4) {
139 ALOGE("can't read more than 4 bytes, trying to read %d", bytes);
142 for (int i = 0; i < bytes; i++) {
153 /* Reads signed/unsigned LEB128 encoded data. From 1 to 4 bytes. */
166 ALOGE("%s: data exceeds expected 4 bytes maximum", __FUNCTION__);
178 /* Reads signed LEB128 encoded data. From 1 to 4 bytes
[all...]
/system/netd/
H A DCommandListener.cpp1101 int64_t bytes; local
1106 int rc = sBandwidthCtrl->getInterfaceSharedQuota(&bytes);
1113 asprintf(&msg, "%lld", bytes);
1120 int64_t bytes; local
1126 int rc = sBandwidthCtrl->getInterfaceQuota(argv[2], &bytes);
1132 asprintf(&msg, "%lld", bytes);
1140 sendGenericSyntaxError(cli, "setquota <interface> <bytes>");
1150 sendGenericSyntaxError(cli, "setquotas <bytes> <interface> ...");
1203 sendGenericSyntaxError(cli, "setiquota <interface> <bytes>");
1270 sendGenericSyntaxError(cli, "setglobalalert <bytes>");
[all...]
H A DBandwidthController.cpp605 ALOGE("Invalid bytes value. 1..max_int64.");
709 ALOGE("Invalid bytes value. 1..max_int64.");
767 int BandwidthController::getInterfaceSharedQuota(int64_t *bytes) { argument
768 return getInterfaceQuota("shared", bytes);
771 int BandwidthController::getInterfaceQuota(const char *costName, int64_t *bytes) { argument
783 scanRes = fscanf(fp, "%lld", bytes);
784 ALOGV("Read quota res=%d bytes=%lld", scanRes, *bytes);
822 int BandwidthController::updateQuota(const char *quotaName, int64_t bytes) { argument
833 fprintf(fp, "%lld\n", bytes);
838 runIptablesAlertCmd(IptOp op, const char *alertName, int64_t bytes) argument
870 runIptablesAlertFwdCmd(IptOp op, const char *alertName, int64_t bytes) argument
898 setGlobalAlert(int64_t bytes) argument
981 setSharedAlert(int64_t bytes) argument
997 setInterfaceAlert(const char *iface, int64_t bytes) argument
1033 setCostlyAlert(const char *costName, int64_t bytes, int64_t *alertBytes) argument
1100 int64_t packets, bytes; local
[all...]
/system/core/sh/
H A Darith_lex.c188 /* Size of input buffer in bytes, not including room for EOB
295 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
1409 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1611 * @param size the size in bytes of the character buffer
1649 * @note If you want to scan bytes that may contain NUL values, then use
1658 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1659 * scan from a @e copy of @a bytes.
1660 * @param bytes the byte buffer to scan
1661 * @param len the number of bytes in the buffer pointed to by @a bytes
1665 yy_scan_bytes(yyconst char * bytes, int len ) argument
[all...]

Completed in 168 milliseconds